Re: Order by question

From: Krish Mohan <kmohan_at_cisco.com>
Date: Wed, 26 May 1999 14:50:34 -0700
Message-ID: <374C6CA9.B5211B30_at_cisco.com>


Try This.

Select col1, col2, ... , status
from table
where < your where condition>
order by decode(status,'F',2,'I',1,'U',3);

regards
krish mohan
kmohan_at_cisco.com

Deepa Raman wrote:

> Hi,
>
> I have a table which has a column called "status"
> There are three values status can have 'I', 'F', U'
>
> When I write the query to select from this table I want to get all the 'I'
> first, then the 'F' then the 'U' records.......
>
> How would I say that in an order by clause ........
>
> Thanks,
> Deepa.
> Deepar_at_aeimusic.com
Received on Wed May 26 1999 - 23:50:34 CEST

Original text of this message