Forums Register Login

order by date_arrive but what if...

+Pie Number of slices to send: Send
Assuming I have a table with the following attributes:

Name date arrive


Say, for example, I have the following information � they are ordered by date

Name date arrive
Dan 1-feb-2005
James 5-feb-2005
Gore 6-feb-2005

Now, say Gil comes on 6-feb-2005 so the result will be:

Name date arrive
Dan 1-feb-2005
James 5-feb-2005
Gore 6-feb-2005
Gil 6-feb-2005

What if I want Gil to come before Gore (they are on the same date BUT Gil is before GORE � in the alphabetic order)

Does anyone have idea what the SQL Statement to be?

I have

Select Name, Date_Arrive from myTable order by Date_Arrive
+Pie Number of slices to send: Send
You can sort by more than one column:

Select Name, Date_Arrive from myTable order by Date_Arrive, Name
+Pie Number of slices to send: Send
thanks this solves the problem
They worship nothing. They say it's because nothing is worth fighting for. Like this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 994 times.
Similar Threads
Date & Time Problem
insert or update???
Gore Calls for Rumsfeld, Rice and Tenet to Resign
Help with queue program
Colors in JTable - unexpected result when scrolling
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 19, 2024 00:23:05.