Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: sort by decode in union all

Re: sort by decode in union all

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: 2000/05/29
Message-ID: <rgf3jsg183vtu18vlva5t962p6kic8obd1@4ax.com>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US