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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Alternative to UNION

Re: Alternative to UNION

From: Brian Peasland <oracle_dba_at_nospam.peasland.net>
Date: Wed, 28 Jun 2006 23:59:01 GMT
Message-ID: <J1LHAH.EAE@igsrsparc2.er.usgs.gov>


Al wrote:
> I'm trying to create a view in Oracle that will be accessed by a
> vendor application. Apparently the vendor app does something weird when
> it access a view that uses a UNION or UNION ALL statement. Is there an
> alternate method to UNION that can give the same result? The query
> below is a simplified version. Any help would be appreciated.
> -Thanks, Al Benvin
>
> CREATE OR REPLACE VIEW COMBO_V AS
> SELECT *
> FROM (SELECT ID
> FROM TABLE1)
> UNION ALL
> (SELECT ID
> FROM TABLE2) ;
>

Why not create the view as follows:

CREATE OR REPLACE VIEW COMBO_V AS
SELECT ID FROM TABLE1
UNION ALL
SELECT ID FROM TABLE2; I'm not quite sure what you mean by "the vendor app does something weird". Can you post your error messages or further information that would lead us to a root cause?

HTH,
Brian

-- 
===================================================================

Brian Peasland
oracle_dba_at_nospam.peasland.net
http://www.peasland.net

Remove the "nospam." from the email address to email me.


"I can give it to you cheap, quick, and good.
Now pick two out of the three" - Unknown
Received on Wed Jun 28 2006 - 18:59:01 CDT

Original text of this message

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