Click here to Skip to main content
13,094,983 members (81,681 online)
   

Database

 
AnswerRe: SQL Query - append results Pin
Chris Meech5-Dec-12 6:55
memberChris Meech5-Dec-12 6:55 
GeneralRe: SQL Query - append results Pin
AndreFratelli5-Dec-12 7:08
memberAndreFratelli5-Dec-12 7:08 
QuestionSQL 2008 Data Base Table Design suggestion Pin
VishwaKL4-Dec-12 23:36
memberVishwaKL4-Dec-12 23:36 
AnswerRe: SQL 2008 Data Base Table Design suggestion Pin
Simon_Whale4-Dec-12 23:43
memberSimon_Whale4-Dec-12 23:43 
GeneralRe: SQL 2008 Data Base Table Design suggestion Pin
VishwaKL4-Dec-12 23:47
memberVishwaKL4-Dec-12 23:47 
GeneralRe: SQL 2008 Data Base Table Design suggestion Pin
Simon_Whale4-Dec-12 23:51
memberSimon_Whale4-Dec-12 23:51 
AnswerRe: SQL 2008 Data Base Table Design suggestion Pin
PIEBALDconsult5-Dec-12 3:56
memberPIEBALDconsult5-Dec-12 3:56 
Question[HELP] how to using array in my case? (Query & PHP) Pin
jimmy.suharry4-Dec-12 20:14
memberjimmy.suharry4-Dec-12 20:14 
AnswerRe: [HELP] how to using array in my case? (Query & PHP) Pin
Mycroft Holmes4-Dec-12 20:38
memberMycroft Holmes4-Dec-12 20:38 
GeneralRe: [HELP] how to using array in my case? (Query & PHP) Pin
jimmy.suharry4-Dec-12 20:56
memberjimmy.suharry4-Dec-12 20:56 
QuestionSQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 3:09
memberAnirbanM 23-Dec-12 3:09 
AnswerRe: SQL query Date Sort Problem Pin
ihoecken3-Dec-12 4:42
memberihoecken3-Dec-12 4:42 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:46
memberAnirbanM 23-Dec-12 18:46 
AnswerRe: SQL query Date Sort Problem Pin
Eddy Vluggen3-Dec-12 5:20
memberEddy Vluggen3-Dec-12 5:20 
AnirbanM 2 wrote:
Out of 100 times running this query, 97-98 times, it's producing correct result, however, 1-2 times, sort is not working, so instead of 1st to 31st, output coming like 10th to 31st then 1st to 10th.

From that, I'd say you have different collations (or regional settings on the client). But AFAIK, that would only apply to string-types, like VARCHAR and NTEXT.

Try converting the datetime to a fixed-format string, and sort on that.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:48
memberAnirbanM 23-Dec-12 18:48 
GeneralRe: SQL query Date Sort Problem Pin
Eddy Vluggen3-Dec-12 23:00
memberEddy Vluggen3-Dec-12 23:00 
AnswerRe: SQL query Date Sort Problem Pin
djj553-Dec-12 5:46
memberdjj553-Dec-12 5:46 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 19:12
memberAnirbanM 23-Dec-12 19:12 
AnswerRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 8:50
memberPIEBALDconsult3-Dec-12 8:50 
GeneralRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 13:12
memberMycroft Holmes3-Dec-12 13:12 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 13:18
memberPIEBALDconsult3-Dec-12 13:18 
GeneralRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 16:18
memberMycroft Holmes3-Dec-12 16:18 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 17:29
memberPIEBALDconsult3-Dec-12 17:29 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:57
memberAnirbanM 23-Dec-12 18:57 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 18:52
memberAnirbanM 23-Dec-12 18:52 
AnswerRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 16:24
memberMycroft Holmes3-Dec-12 16:24 
GeneralRe: SQL query Date Sort Problem Pin
PIEBALDconsult3-Dec-12 17:28
memberPIEBALDconsult3-Dec-12 17:28 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 19:07
memberAnirbanM 23-Dec-12 19:07 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 23-Dec-12 19:10
memberAnirbanM 23-Dec-12 19:10 
GeneralRe: SQL query Date Sort Problem Pin
Mycroft Holmes3-Dec-12 19:48
memberMycroft Holmes3-Dec-12 19:48 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 24-Dec-12 2:12
memberAnirbanM 24-Dec-12 2:12 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 24-Dec-12 2:30
memberAnirbanM 24-Dec-12 2:30 
GeneralRe: SQL query Date Sort Problem Pin
Eddy Vluggen4-Dec-12 3:12
memberEddy Vluggen4-Dec-12 3:12 
GeneralRe: SQL query Date Sort Problem Pin
AnirbanM 24-Dec-12 3:27
memberAnirbanM 24-Dec-12 3:27 
GeneralRe: SQL query Date Sort Problem Pin
Eddy Vluggen4-Dec-12 4:44
memberEddy Vluggen4-Dec-12 4:44 
AnswerRe: SQL query Date Sort Problem Pin
Michael Potter4-Dec-12 8:11
memberMichael Potter4-Dec-12 8:11 
AnswerRe: SQL query Date Sort Problem Pin
jschell4-Dec-12 8:23
memberjschell4-Dec-12 8:23 
Questionoltp vs olap Pin
a.fatemeh2-Dec-12 10:51
membera.fatemeh2-Dec-12 10:51 
AnswerRe: oltp vs olap Pin
Mycroft Holmes2-Dec-12 11:49
memberMycroft Holmes2-Dec-12 11:49 
GeneralRe: oltp vs olap Pin
a.fatemeh2-Dec-12 11:57
membera.fatemeh2-Dec-12 11:57 
GeneralRe: oltp vs olap Pin
Mycroft Holmes2-Dec-12 13:28
memberMycroft Holmes2-Dec-12 13:28 
GeneralRe: oltp vs olap Pin
a.fatemeh2-Dec-12 13:41
membera.fatemeh2-Dec-12 13:41 
GeneralSQL instance name when using network group Pin
Aamir Saleem2-Dec-12 10:32
memberAamir Saleem2-Dec-12 10:32 
GeneralRe: SQL instance name when using network group Pin
Mycroft Holmes2-Dec-12 11:43
memberMycroft Holmes2-Dec-12 11:43 
QuestionACL vs SQL for fuzzy matching Pin
Ben Dessau29-Nov-12 4:15
memberBen Dessau29-Nov-12 4:15 
AnswerRe: ACL vs SQL for fuzzy matching Pin
Pete O'Hanlon29-Nov-12 5:07
protectorPete O'Hanlon29-Nov-12 5:07 
GeneralRe: ACL vs SQL for fuzzy matching Pin
Ben Dessau29-Nov-12 6:43
memberBen Dessau29-Nov-12 6:43 
GeneralRe: ACL vs SQL for fuzzy matching Pin
Pete O'Hanlon29-Nov-12 6:50
protectorPete O'Hanlon29-Nov-12 6:50 
QuestionSQL Query Pin
berba29-Nov-12 2:22
memberberba29-Nov-12 2:22 
AnswerRe: SQL Query Pin
Richard Deeming29-Nov-12 2:50
memberRichard Deeming29-Nov-12 2:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy |
Web03 | 2.8.170813.1 | Last Updated 15 Aug 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid