Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Ordering
David BARATTE wrote at 17-Apr-00 09:34:19
on the subject Ordering:
>Hello,
>Is it possible to select rows in a specified order in another way that
>"ORDER BY [column_name | column_pos] [ASC | DESC"]
>e.g : ORDER BY column_name (1, 3, 2, ...)
>where 1, 3, 2 ... are the possible values of column_name
>and 1,3,2 is the given order.
You could use an order by on a decode. Something like this:
select * from your_table
order by decode (a_column,1,1,2,3,3,2,5);
Eventually, you have to modify the syntax slightly since I did not check
it.
You may want to experiment with function based indexes because the above
SQL doesn't look very performant...
Hope that helps,
Lothar
-- Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Hauptstr. 26 | lothar.armbruester_at_t-online.de D-65346 Eltville |Received on Mon Apr 17 2000 - 00:00:00 CDT
![]() |
![]() |