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

Home -> Community -> Mailing Lists -> Oracle-L -> SQL query without UNION clause

SQL query without UNION clause

From: Krishnaswamy, Ranganath <Ranganath.Krishnaswamy_at_blr.hpsglobal.com>
Date: Wed, 18 Dec 2002 23:53:45 -0800
Message-ID: <F001.0051DD94.20021218235345@fatcity.com>


Hi all,

How do I forumlate the below query without using the UNION clause?

SELECT H1.OID HISTORIEOID,FAHRZEUG.AMTLICHESKENNZEICHEN, FAHRZEUG.OID,
H1.PRODUKT,H1.AUFTRAGSPOSITIONSNR,H1.MYTECHOBJEKT FROM FAHRZEUG,HISTORIE H1

WHERE FAHRZEUG.OID = H1.MYTECHOBJEKT(+)
AND TO_DATE(H1.DATUMSTR,'YYYY-MM-DD') = (select
max(TO_DATE(H1.DATUMSTR,'yyyy-mm-dd'))

from historie ,FAHRZEUG WHERE FAHRZEUG.OID = HISTORIE.MYTECHOBJEKT AND HISTORIE.MYTECHOBJEKT=H1.MYTECHOBJEKT)
AND H1.PRODUKT IN('HU', 'AU')
UNION
SELECT H1.OID HISTORIEOID,FAHRZEUG.AMTLICHESKENNZEICHEN, FAHRZEUG.OID,
H1.PRODUKT,H1.AUFTRAGSPOSITIONSNR,H1.MYTECHOBJEKT FROM FAHRZEUG,HISTORIE H1
WHERE FAHRZEUG.OID = H1.MYTECHOBJEKT(+) AND H1.PRODUKT IN('DS', 'NFZ', 'BES', 'DekraSiegel', '700000', '700202');

I can't use the union clause because I am using an Object-Relationship tool called Cocobase which doesn't support the UNION clause. Any help in this regard is very much appreciated.

Thanks and Regards,

Ranganath

WARNING: The information in this message is confidential and may be legally privileged. It is intended solely for the addressee. Access to this message by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, or distribution of the message, or any action or omission taken by you in reliance on it, is prohibited and may be unlawful. Please immediately contact the sender if you have received this message in error. Thank you.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Krishnaswamy, Ranganath
  INET: Ranganath.Krishnaswamy_at_blr.hpsglobal.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Dec 19 2002 - 01:53:45 CST

Original text of this message

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