Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Joins on multiple tables
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Joins on multiple tables
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01070900
Message ID:
01070900
Vues:
45
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform