View previous topic :: View next topic
|
Author |
Message |
callkris_cit
New User
Joined: 22 Apr 2006 Posts: 44
|
|
|
|
Is it possible shall i write the query against the tables present in 2 different region.
I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.
How i will combine this 2 table ( TABLE1 DB2S region, TABLE1 DB2V region) |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Please specify your requirement clearly. It would be great if you can post sample output.[/code] |
|
Back to top |
|
|
r2k1984
New User
Joined: 21 Jun 2005 Posts: 69 Location: chennai
|
|
|
|
It can be done .. you can put in database.tablespace for select and you will get it..
Sample
Select * from Table1 in tablespace.databasename; will work try it. |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
I Guess this cannot be done . suggestions are welcome
Quote: |
I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.
|
Whats the requirement for joining same table in different region. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
it can be done,
but the DB2 systems must be properly setup,
the issue falls into the realm of DRDA ( distributed relational database access )
the fact that the two DB2 subsystem run in the same zOS is logically irrelevant
once things are properly setup the locations of the DRDA partners are irrelevant,
( that' s the smart part of the whole thing )
the db2 manuals explain very clearly what has to be done |
|
Back to top |
|
|
Prasanthhere
Active User
Joined: 03 Aug 2005 Posts: 306
|
|
|
|
Quote: |
it can be done,
but the DB2 systems must be properly setup,
the issue falls into the realm of DRDA
|
Thanks enrico for this information . I guess there are some issues with our shop. when I tried joining tables in two different regions I was getting an error |
|
Back to top |
|
|
VVRAVINDRA
New User
Joined: 04 Aug 2008 Posts: 46 Location: Chennai
|
|
|
|
Please excuse me if I'm wrong... since I could not dig much gold from the requirement that is provided, the long journey starts from extracting the data from table in region1 with the specified select criteria and then extracting the data from same table in region2 with the same select criteria and do a compare of data... It would be a much easier process if your shop provides the PST tools.
Thanks,
Ravi |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Prasanthhere wrote: |
when I tried joining tables in two different regions I was getting an error |
Do you remember what kind of error were you getting? It may be useful for us in future. |
|
Back to top |
|
|
callkris_cit
New User
Joined: 22 Apr 2006 Posts: 44
|
|
|
|
I have the first table ( TABLE1 ) in DB2S Region, same table (TABLE1) in DB2V Region.
How i will combine this 2 table ( TABLE1 DB2S region, TABLE1 DB2V region)
The reason for combining these table is,
TABLE1 ( DB2S region ), and the same TABLE1(DB2V Region),
( Consider ROLLNO, MARK are 2 fields in the TABLE1)
If ROLLNO ( TABLE 1 DB2S ) = ROLLNO ( TABLE1 DB2V) and MARK( TABLE1 DB2S) Not equal to MARK(TABLE1 DB2V)
Then select those ROLLNOs |
|
Back to top |
|
|
Bharath Bhat
Active User
Joined: 20 Mar 2008 Posts: 283 Location: chennai
|
|
|
|
Join the tables in SPUFI/QMF. That should work. I did not exactly try your query but I joined same table in different regions and got the expected results.
Just curious to know what are you going to do with them? |
|
Back to top |
|
|
|