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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: UNION

RE: UNION

From: אדר יחיאל <adary_at_mehish.co.il>
Date: Thu, 17 Jan 2002 12:05:39 -0800
Message-ID: <F001.003F31C9.20020117112520@fatcity.com>

Did a little testing.
I think that the columns names are decided by the first select only. The union adds the rows from the second select to the result set created by the first select.
That's mean that your columns are a , b , c. So order by 'a' will work. It did in my test.

Yechiel Adar, Mehish Computer Services
adary_at_mehish.co.il

> -----Original Message-----
> From: Hamid Alavi [SMTP:hamid.alavi_at_quovadx.com]
> Sent: Thu, January 17, 2002 8:31 PM
> To: Multiple recipients of list ORACLE-L
> Subject: UNION
>
> Hi,
>
> I try to use union and order by first column of first select statment and
> also first column of second select statment but get error, Any Idea how to
> do this??
>
> SELECT A,B,C FROM TABLEABC
> UNION
> SELECT D,E,F FROM TABLEDEF
> ORDER BY A,D
>
>
>
>
> Hamid Alavi
> Office 818 737-0526
> Cell 818 402-1987
>
> The information contained in this message and any attachments is intended
> only for the use of the individual or entity to which it is addressed, and
> may contain information that is PRIVILEGED, CONFIDENTIAL and exempt from
> disclosure under applicable law. If you have received this message in
> error,
> you are prohibited from copying, distributing, or using the information.
> Please contact the sender immediately by return e-mail and delete the
> original message from your system.
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Hamid Alavi
> INET: hamid.alavi_at_quovadx.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: 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
> also send the HELP command for other information (like subscribing).
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> This e-mail was scanned by the eSafe Mail Gateway
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-8?Q?=E0=E3=F8_=E9=E7=E9=E0=EC?=
  INET: adary_at_mehish.co.il

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: 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
also send the HELP command for other information (like subscribing).
Received on Thu Jan 17 2002 - 14:05:39 CST

Original text of this message

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