SQL-String ORDER ASC|DESC ... How?

Results 1 to 2 of 2

Thread: SQL-String ORDER ASC|DESC ... How?

  1. #1
    J.P.Jarolim Guest

    Default SQL-String ORDER ASC|DESC ... How?

    Hi!<BR><BR>I&#039m seeking a possibility to sort the results of a Recordset Ascending or descending. The Jet-SQL - Help has shown me this possibility: ORDER ASC or DESC Attribute_Name.<BR><BR>But this causes a Error-Message by the ASP-Server.<BR><BR>Is anybody able to show me the correct way to do this?<BR><BR>Thanks in advance...<BR><BR>J.P.Jarolim<BR>jaro00@gmx.at

  2. #2
    Join Date
    Dec 1969

    Default RE: SQL-String ORDER ASC|DESC ... How?

    I don&#039t know what kind of database you&#039re running your SQL query against, but standard SQL would be something like this.<BR><BR>Select * from table_name order by field_name ASC &#124 DESC<BR><BR>Default is ASC, so if that&#039s the case, you can leave it off. You can order by on more than one field...<BR><BR>Select * from table_name order by field_name1, field_name2<BR><BR>This works against SQLServer and Oracle. Should work with Access as well. <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