Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: union, minus and order by
Turn the select into a dynamic view and use an order by...
select *
from (
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla
UNION ALL
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla2
MINUS
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla3
)
ORDER BY 1,2,3;
--
Chuck Hamilton
Oracle DBA
Enterprise Technical Services
G.Plivna_at_itsy stems.lv To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com> Ext: NA cc: (bcc: CHUCK HAMILTON/QVC) Sent by: Subject: union, minus and order by root_at_fatcity. com 04/30/00 02:04 PM Please respond to ORACLE-L
Hi!
I have SELECT like this
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla
UNION ALL
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla2
MINUS
SELECT
c1.Id ID, c1.Name CNAME, t.name TNAME
FROM blabla3
;
The problem is how to get rows ordered by these three fields
Gints Plivna
--
Author:
INET: G.Plivna_at_itsystems.lv
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may Received on Mon May 01 2000 - 09:01:18 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
![]() |
![]() |