Order by Date Descending

Results 1 to 3 of 3

Thread: Order by Date Descending

  1. #1
    Join Date
    Dec 1969

    Default Order by Date Descending

    I have the following code that works fine, but need to add to the end of the string where the information is Ordered by Date Descending. Im not sure how to add this to the string I have. Can someone please help me with this string. Thanks.<BR><BR>SQL_INFO = "SELECT * "_<BR> &"From Reviews " _<BR> &"WHERE Email = &#039;"_<BR> & Request("Email")_<BR> &"&#039;"_<BR> &"AND Marker = &#039;"_<BR> & "B"_<BR> &"&#039;;"<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Order by Date Descending

    Excatly as you put it: & "ORDER BY Date DESC"<BR>Take a look: http://www.devguru.com/Technologies/jetsql/quickref/order_by.html

  3. #3
    Join Date
    Dec 1969

    Default Won't work in Access...

    ...if you actually have a field named DATE, because DATE is a reserved word (a function that returns today&#039;s date) and so all the records would be equal (all would be sorted by today&#039;s date).<BR><BR>If you really have a field of that name in Access, then put [...] around the name:<BR> ORDER BY [Date] DESC<BR>in order to tell Access you really mean your field name and not the function.<BR><BR>(Or course, if your field is named something like "OrderDate" then just doing<BR> ORDER BY OrderDate DESC<BR>is fine. But just watch out for reserved words.)<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts