Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: sort by decode in union all
I would think that you could do:
ORDER BY DECODE (&p,1,status,2,empno,sal);
Don't quote status, empno, and salary. Refer to the column names in your query.
On Sun, 28 May 2000 16:39:33 GMT, "Peter Chang" <jchang_at_flash.net> wrote:
> order by 2,1,3 ----------- I know do
>that
>
> But how do you do order by (decode
>&p,1,'status',2,empno,sallary)
Received on Mon May 29 2000 - 00:00:00 CDT
![]() |
![]() |