Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Red face Unanswered: Join tables in Different Databases using 3 part name


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

    for e.g.


    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:

    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.


  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    Which DB2 version and OS are you using?


  3. #3
    Join Date
    Apr 2006
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5-V11 Fundamentals- DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts