View Single Post
  #4 (permalink)  
Old March 1st, 2008, 06:40 PM
mat41 mat41 is offline
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41
Default

Since you say:

;;;I am using ASP for getting data from database and display

I assume your query is working ok? Not sure why urtrivedi altered it..... Anyhow to order an existing working query you simply append:

" ...... ORDER BY [yourDateFieldName];"

NOTE - Its a good practice to place trailing semi colons at the end of any query. I assume 'yourDateFieldName' is a date data type? It needs to be to get what you want. Remember things are ordered ascending by default. To reverse this you need to place DESC at the end of the query

Wind is your friend
Matt
www.elitemarquees.com.au
Reply With Quote