Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Multiple column sorting with a decode
Hello,
I am trying to sort on multiple columns using a parameter that I
specify as the sort order.
For example,
...
ORDER BY DECODE(:param,1, '1, 3', 2, '1,4')
While the order by works using any combination of columns, by using the
decode, it does not.
A single colomn ordering (DECODE(:param,1,'1',2',2)) works tough.
Any ideas ?
(the goal is to order trough multiple columns using a parameter specfying the order type. Received on Thu Nov 24 2005 - 13:02:42 CST