SQL question: using UNION in FROM clause with DB2 V5 
Author Message
 SQL question: using UNION in FROM clause with DB2 V5
I'm wondering if UNION is accepted in a FROM clause.  For example:

Select A.c1, A.c2
  From (Select a, b From T1
        Union
        Select c, d From T2) A,
       T3 B
 Where A.ID = B.ID

I notice that it is a valid statement in SQL Server and Oracle

Thanks for the help
Godwin

Sent via Deja.com http://www.***.com/
Before you buy.



Fri, 07 Mar 2003 03:00:00 GMT
 SQL question: using UNION in FROM clause with DB2 V5

Hi,

It is valid in DB2 for Workstations as well (at least since V2).
I can't speak for DB2 on OS/390 and AS/400.

Cheers
Serge

--
Visit the DB2 UDB and DB2 Connect Online Support site at:
http://www.ibm.com/software/data/db2/udb/winos2unix/support



Fri, 07 Mar 2003 03:00:00 GMT
 SQL question: using UNION in FROM clause with DB2 V5
Hi,
  This is for OS/390.  I couldn't find any information on the web site
as well.

Thanks for the info.
Godwin



Quote:
> Hi,

> It is valid in DB2 for Workstations as well (at least since V2).
> I can't speak for DB2 on OS/390 and AS/400.

> Cheers
> Serge

> --
> Visit the DB2 UDB and DB2 Connect Online Support site at:
> http://www.ibm.com/software/data/db2/udb/winos2unix/support

Sent via Deja.com http://www.deja.com/
Before you buy.


Sat, 08 Mar 2003 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Using UNION and ORDER BY clauses

2. Using Union subquery in select clause

3. UNION clause syntax question

4. UNION Clause Question

5. UNION clause questions

6. Sun press relelease: Benchmark results using DB2 UDB V5

7. DB2 for OS/390 REXX Language Support for DB2 V5.1

8. DB2 CAE V5.2 (fixpack 15) and DB2 Connect EE V7.1

9. Advantages DB2 V6.1 on DB2 V5.2

10. Moving from a DB2 V2 certification to a DB2 UDB V5 certification

11. Order By clause with UNION : SQL Server 2000


 
Powered by phpBB® Forum Software