If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Join tables in Different Databases using 3 part name

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-24-10, 15:13
freakabhi freakabhi is offline
Registered User
 
Join Date: Feb 2010
Posts: 1
Red face Join tables in Different Databases using 3 part name

All,


I have a query where I am trying to join tables from different databases
using 3 part table name

for e.g.

<Database>.<Schemea>.<Table>

Table 1 : R2:dbsc:tabA
Table 2 : R4:dbsc:tabB

I am running query from R2 Database, and I can access R4:dbsc:tabB
as SELECT * FROM R4:dbsc:tabB ;

while I join the 2 tables:
as

SELECT * FROM R4:dbsc:tabB AS tabB, R2:dbsc:tabA as TabA
WHERE tabB.ID = TabA.ID

This throws error as :
SQL10007 : reason code "105"............

Is it that we can not join tables in different databases or we have some differnet way.


Thanks,
Abhijeet
Reply With Quote
  #2 (permalink)  
Old 02-24-10, 15:22
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
Which DB2 version and OS are you using?

Andy
Reply With Quote
  #3 (permalink)  
Old 02-25-10, 07:02
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
in db2 we never 3 part names. if the remote db is also db2 you can define nicknames. these are also 2 part names as regular tables
how did you define these remote tables to the local db
distributed luw is normally not supported
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
Reply

Tags
join with 3 part name

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On