orderby

maravinds

Registered User.
Local time
Today, 01:08
Joined
Apr 26, 2006
Messages
26
Hallo everyone,

I have a table with one of its column value as "B" or "D" or "E".

Now i am in need to display the rows using the select statement with the following conditions.

1. First display the rows with value "D"
2. then display the rows with value "E"
3. then display the rows with value "B"

Is it possible to specify the above condition in a orderby clause.

thanks,

aravind.s
 
IIF([MyCol]="D",1,IIF([MyCol]="E",2,3)) as sortcol

Or if you don't need the columnn, try using it in the order by
 

Users who are viewing this thread

Back
Top Bottom