Link to home
Start Free TrialLog in
Avatar of DaveChoiceTech
DaveChoiceTech

asked on

Join master table to multiple related btables

TABLE 1
      table1_ID1,
      tablel_ID2
      
TABLE 2
      table2_ID
      
TABLE 3      
      table3_ID
      
I need to join the three tables.
TABLE 1 is the main table
It want to join to table1 to tablet2 where table1_ID1 = table2_ID
and to join table1 to table3 where table1_ID1 = table3_ID

Only records with values in all three tables should be joined.

I am using DB2

How can this be done?
SOLUTION
Avatar of lcohan
lcohan
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of DaveChoiceTech
DaveChoiceTech

ASKER

I had already solved my issue and thought I had deleted the question. All the answers were good so I accepted multiple solutions.