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

Home -> Community -> Usenet -> c.d.o.server -> Re: [Q] Why cant I ORDER BY on a SELECT...UNION in PL/SQL

Re: [Q] Why cant I ORDER BY on a SELECT...UNION in PL/SQL

From: Satish Narasimha <satishn_at_blr.sni.de>
Date: 1998/02/25
Message-ID: <34F39F90.C0E@blr.sni.de>#1/1

>
> Try using the position of the column instead of the name.
> In your example,
>
> select col1,col2 from tab1
> union
> select col1,col2 from tab2
> order by 1
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/ Now offering spam-free web-based newsreading

hello,

    As per ur query it works for me. It didn't show any errors to me.    But one thing u need to take care here is both col1 of A and B    table should be matching clearly.( Datatypes).

   Pleace check this and work out....Hope this might help u....    All the best

 from
 Satish N Received on Wed Feb 25 1998 - 00:00:00 CST

Original text of this message

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