I have 3 cursors
CLookup - containing job_descr and lookup_key
CEmployeeLookup - containing employee info including name_l, lookup_key (for clookup job_descr), elu_Key (employee lookup key)
CTeam - contaning the Emp_key and ro_Key (repair order key) that it's tied to
the cteam cursor currently contains 1 team member for test purposes. cEmployeeLookup contains 3 employees. Clookup contains a whole slew of lookup descriptions for all kinds of things (color, job desr, vehicle make, etc.)
I'm trying to create a temporary table of all Team members on a particular Repair Order which includes: l_name, job_descr
I have no problem using a Join when it involves 2 tables:
SELECT cteam.elu_id, cemployeelookup.elu_eid FROM cteam LEFT JOIN cemployeelookup ON cteam.elu_id = cemployeelookup.elu_key
That gets me a list of only 1 team member like it should. When I add the 3rd factor to it though, it shows the same member as many times as there are lookup values. What rule do I need to keep in mind with a 3 table join, and could you show me an example of this?
(I would give you what I have but by now, I know it is completely screwed up after trying everything I know so that is probably pointless)
Thanks very much
Marcel