Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: cusotm sort in order by
Actually i wanted to list a column's values in some order other than ASC
and DESC. Now i've got the answer from all your responses that decode or
similar user_defined functions could be used with 'order by' in
'select'.
Maybe i could have said in my post that the values in the column on which custom ordering is required, are limited and i know their order no. in the output.
Thanks
In article <37A6DF87.71E5BD1F_at_Unforgettable.com>,
BluesSax_at_Unforgettable.com wrote:
> That isn't a sort. The term 'sort' implies collation by pre-defined
> order. Typically this is canonically in alphabetic order. Your example
> doesn't provide any explanation for how you arrived at your
> non-alphabetic order. Therefore it is impossible to derive an
algorithm
> whereby the data ordering can be performed.
>
> Nandakumar wrote:
>
> > I like to sort the rows of a table in a custom order of a column.
> > Say the table T(A,B) has values for B as
> > 'Snake' 'Dog', 'Horse', 'Elephant'.
> > I would want the select to list the values in the order
> > 'Dog' 'Hosrse' 'Snake' 'Elephant'. (** Not in ASC or DESC orders)
> >
> > Would appreciate any help.
> > --
> > Nandakumar
> > Systems Analyst
> > New York
> > (N.Kumar_at_rocketmail.com)
> >
> > Sent via Deja.com http://www.deja.com/
> > Share what you know. Learn what you don't.
>
>
--
Nandakumar
Systems Analyst
New York
(N.Kumar_at_rocketmail.com)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Tue Aug 03 1999 - 11:42:20 CDT