If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > how to ORDER by more than 1 criteria

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-20-04, 17:25
jaberwocky jaberwocky is offline
Registered User
 
Join Date: Feb 2004
Location: Vancouver
Posts: 17
how to ORDER by more than 1 criteria

Can someone tell me how i would use the ORDER BY code to show data in a table using more than one criteria ie:
Code:
sql="SELECT * FROM AbsenceServicesQuery WHERE newDate BETWEEN #" & StartDate & "# AND #" & EndDate & "# ORDER BY ""newDate"", ""dept"" ASC "
right now i am ordering my results by 'newDate', but i also want to have it ordered secondarily by 'dept'. I tried the above, but it doesnt work
thanks
__________________
still in the baby steps of coding
Reply With Quote
  #2 (permalink)  
Old 02-20-04, 22:27
gyuan gyuan is offline
Registered User
 
Join Date: Dec 2003
Posts: 454
sql="SELECT * FROM AbsenceServicesQuery WHERE newDate BETWEEN #" & StartDate & "# AND #" & EndDate & "# ORDER BY newDate, dept ASC"
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On