IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Joining 2 tables


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Sat Sep 11, 2010 2:17 am
Reply with quote

Hi,

I have Table A and TableB in 2 Databases (PRD11 and PRD88) & in 2 Db2 regions ABC and XYZ respectively.

TableA : DBPPRD11.ABCDB2P.TableA
TableB : DBPPRD88.XYZDB2P.TableB

Now in the above example, the database are different and DB regions are different and my requirement is to cross these 2 tables to filter results. How do I achieve this join?

Thanks,
Arien
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Sep 11, 2010 4:19 am
Reply with quote

Hello,

Suggest you speak with your dba about which alternatives might be available for this.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Mon Sep 13, 2010 12:56 pm
Reply with quote

Hello Arien,

You can use db2 3 quaifier name to refer these tabes.
Back to top
View user's profile Send private message
GuyC

Senior Member


Joined: 11 Aug 2009
Posts: 1281
Location: Belgium

PostPosted: Mon Sep 13, 2010 7:44 pm
Reply with quote

arien wrote:
Hi,

I have Table A and TableB in 2 Databases (PRD11 and PRD88) & in 2 Db2 regions ABC and XYZ respectively.

TableA : DBPPRD11.ABCDB2P.TableA
TableB : DBPPRD88.XYZDB2P.TableB

Now in the above example, the database are different and DB regions are different and my requirement is to cross these 2 tables to filter results. How do I achieve this join?

Thanks,
Arien

some DB2 Z/OS terminology:
DBPRD11 and DBPRD88 are not databases , but SUBSYSTEMs
ABCDB2P and XYZDB2P are not regions, but SCHEMA's, OWNERs, QUALIFIERs or even CREATORs

You can not join tables from different Subsystems.

In fact : this is the same question as asked friday (only 2 -5 post lower in the overview) : ibmmainframes.com/viewtopic.php?t=51200
Back to top
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Wed Sep 15, 2010 8:22 pm
Reply with quote

Thank you all. This definitely clarifies my concepts.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Need to fetch data from so many DB2 t... DB2 9
No new posts How to: PK does not exist in several ... DB2 6
No new posts Discrepancy b/w SYSIBM tables and BMC... DB2 0
No new posts SYSIBM Tables Query DB2 8
No new posts Column names in SYSIBM tables DB2 5
Search our Forums:

Back to Top