Lookup Vs Join

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ghostraider
Premium Member
Premium Member
Posts: 49
Joined: Wed Dec 13, 2006 6:31 pm

Lookup Vs Join

Post by ghostraider »

I have three tables A,B,C coming from sql server database. Tables have the following columns

TABLE A
Apply ID
Apply Desc
Apply DOB
User ID

TABLE B
User ID
UserName

TABLE C
User ID
City Zip


I have to first map USER ID from Table A with Table B and then map Table C to get an output similar to below.

Output
ApplyID
ApplyDesc
UserID
City
Zip

So instead of using the hashed file to lookup i did a join on the three tables
in sql server itself i.e. instead of looking up with A with B and then B with C
i wrote a join for the three tables.

Select A.column,B.column,C.column from A
left outer join b on A.key=B.key
left outer join C on B.Key=C.Key

I used left outer join because i do not want to use the Not(ReferenceLink.NotFound) if i did a lookup. So could you guys tell me if the join yields different results to that of the lookup.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It would depend upon how you implemented the lookups, information that you have chosen not to provide. It is possible to achieve the same results with lookup as with join, provided that certain conditions are met.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply