July 9, 2009 at 9:52 am
Hi all,
I have the table with follwing structure
ID( Forgein key ),
UpdatedTime DateTime,
.....
I inserted two records with two same datetime and other parameters differs
but when i am selecting based on Datetime field it does not displays in the order which i have inserted(duplicate datetime) .
I Applied index for ID and UpdatedTime .How do i get the order in which i inserted and also by [DateTime]?
Thanks in Advance
July 9, 2009 at 10:28 am
Unless you have a field that tracks the order that records are inserted )and is used to help order) and the columns you are sorting on are duplicates, there is no guarantee that the records will be returned in the order entered.
July 9, 2009 at 12:28 pm
Lynn Pettis (7/9/2009)
Unless you have a field that tracks the order that records are inserted )and is used to help order) and the columns you are sorting on are duplicates, there is no guarantee that the records will be returned in the order entered.
Glad I gave basically the same answer on this thread.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
July 9, 2009 at 12:46 pm
Jack Corbett (7/9/2009)
Lynn Pettis (7/9/2009)
Unless you have a field that tracks the order that records are inserted )and is used to help order) and the columns you are sorting on are duplicates, there is no guarantee that the records will be returned in the order entered.Glad I gave basically the same answer on this thread.
Well, you know what they say about great minds, right? 😉
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply