RE: OT: Order By Position and UNION

2001-07-12 Thread Larry Elkins
Thanks for the response. I'm wondering if it has always been like that or if it changed with a recent version -- don't know since I have always used positional notation going back to V5 when I started using Oracle (and yes, I know people go back further than that -- that's not the point I was tryi

Re: OT: Order By Position and UNION

2001-07-12 Thread JRicard982
Larry, You can use column name if you only have two statements with your set operators.  However, any more than that you must user positional.  See below.  1  select empno, ename from emp  2  union  3  select deptno, dname from dept  4  union  5  select locid, room from location  6* order

OT: Order By Position and UNION

2001-07-12 Thread Larry Elkins
Listers, <<>> For compound queries (containing set operators UNION, INTERSECT, MINUS, or UNION ALL), the ORDER BY clause must use positions, rather than explicit expressions. <<>> Now, against an 8.1.7 DB on WIN2K: SQL> select deptno, loc from dept 2 union 3 select empno, ename from emp