Ordering outputs

Results 1 to 2 of 2

Thread: Ordering outputs

  1. #1
    Martin Guest

    Default Ordering outputs

    I have a database which outputs reports like so:<BR><BR>Algarve 09/09/00<BR>Algarve 09/08/00<BR>Algarve 09/05/00<BR>Algarve 09/07/00<BR><BR>Is there a way in which I can get them to come out in descending order. I thought I could do this by looking at the year then the month then the date but how can i do this if the columns are not date fields??? Is it possible??<BR><BR>Any help is much appreciated.

  2. #2
    Joel M Guest

    Default Simple

    This can be easily accomlished by adding the "DESC" keyword to the end of your SQL statment...like so:<BR>---------------------------<BR><BR>sql = "SELECT * FROM thetable WHERE year = &#039"& yearvar &"&#039 ORDER BY year DESC"<BR><BR>--------------------------<BR>and that should do the trick<BR><BR>Joel

Posting Permissions

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