[thelist] SQL ORDER BY

j s jslist at sbcglobal.net
Thu Apr 20 13:57:54 CDT 2006


Thanks - Maybe I'll have to change the data.

----- Original Message ----
From: "Rickards, Julian (NDM)" <julian.rickards at ndm.gov.on.ca>
To: thelist at lists.evolt.org
Sent: Thursday, April 20, 2006 1:44:58 PM
Subject: Re: [thelist] SQL ORDER BY


To the best of my knowledge, the only options for Order by is Ascending or Descending. The only way I can think of to do what you want is to have three queries and use the WHERE Class=Open (Close and Suspended) as the separation of the three classes but that will result in all of Class=Open followed by all Class=Close followed by all Class=Suspended. If this meets your needs, it might be something to consider.

The other possibility is to possibly modify the data so that Open is changed to 1Open, Close to 2Close and Suspended to 3Suspended and this will solve the order by issue immediately.

-----Original Message-----

In asp when you do a Select statement - is there anyway to have it ORDER BY specific words in a column?  
In the class column it says Open or Close or Suspended.  With a Select statement can I tell it to ORDER BY Class  - Open then Close then Suspended?
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt !


More information about the thelist mailing list