Forum Moderators: open
For example, if I have three columns in a table.. one for the date, one for a particular time, and one for the user name.. I am trying to get it to order like this:
Jun. 1/08 ¦ 6:00 ¦ userONE
Jun. 1/08 ¦ 7:00 ¦ userONE
Jun. 1/08 ¦ 8:00 ¦ userONE
Jun. 1/08 ¦ 9:00 ¦ userONE
Jun. 1/08 ¦ 6:00 ¦ userTWO
Jun. 1/08 ¦ 7:00 ¦ userTWO
Jun. 1/08 ¦ 8:00 ¦ userTWO
Jun. 1/08 ¦ 9:00 ¦ userTWO
Jun. 2/08 ¦ 6:00 ¦ userONE
Jun. 2/08 ¦ 7:00 ¦ userONE
Jun. 2/08 ¦ 8:00 ¦ userONE
Jun. 2/08 ¦ 9:00 ¦ userONE
Jun. 2/08 ¦ 6:00 ¦ userTWO
Jun. 2/08 ¦ 7:00 ¦ userTWO
Jun. 2/08 ¦ 8:00 ¦ userTWO
Jun. 2/08 ¦ 9:00 ¦ userTWO
This is the closest I could get the query:
SELECT date, hours, username FROM table1 ORDER BY date, hours, username
However, this orders it like this:
Jun. 1/08 ¦ 6:00 ¦ userONE
Jun. 1/08 ¦ 6:00 ¦ userTWO
Jun. 1/08 ¦ 7:00 ¦ userONE
Jun. 1/08 ¦ 7:00 ¦ userTWO
Jun. 1/08 ¦ 8:00 ¦ userONE
Jun. 1/08 ¦ 8:00 ¦ userTWO
Jun. 1/08 ¦ 9:00 ¦ userONE
Jun. 1/08 ¦ 9:00 ¦ userTWO
Can anyone please give me a hint as to how to write the select query in order to display the data in the way above?