Regards,
For more information about the SQL92 standard, have a look at the book
"SQL Instant Reference" by Martin Gruber, published (in U.S.A.) by
Sybex.
Hope this helps.
Michael Serbanescu
---------------------------------------------------------------------
Consider:
select a,b,c from X
UNION
select e,f,g from Y
order by ?
It is clear that a column name is not appropriate in the order by
clause. You *must* use position numbers, e.g. order by 3,1.
HTH
--
Chrysalis
FABRICATI DIEM, PVNC
('To Protect and to Serve')
Terry Pratchett : "Guards Guards"
e.g.
select name, home_phone from contacts;
union
select customer_name, business_phone from customers
order by 2;
HTH
Jim Gregory
==========Poon Chak Yau, 7/16/97==========
Hello,
I have an union statement that have an order-by clause.
However, I get error ORA-01785. Do you know why it requires me to
specify the order by column number instead of column name? In fact,
why Oracle ask for that? Is there any situation that column name is
not possible?
Regards,
Expressed views and opinions are mine
and do not reflect those of my employer or clients
Jim Gregory