Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Joins on multiple tables
Message
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Joins on multiple tables
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01070900
Message ID:
01070900
Views:
47
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
Next
Reply
Map
View

Click here to load this message in the networking platform