Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Out of joint again
Message
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Out of joint again
Divers
Thread ID:
00134203
Message ID:
00134203
Vues:
46
Everytime I think I've got joins figured out, they turn out not to work the way I thought. This time they've really got me confused.

I have the following tables, with the relevant fields:

To_ver: tripkey
Clients: clientkey, clname
Trips: clientkey, tripkey, ipickup, idropoff
Locations: lockey, cloc

I want all the records from to_ver (which is a list of trips that were taken). All the records in to_ver have trips associated with them. From these trips, I want to connect to the clients table to get "clname", and connect to the locations table to get the "cloc" associated with ipickup and idropoff. (ipickup and idropoff contain the equivilent of lockey in the locations table)

I need to end up with all the info from to_ver, matched with the client that took the trip, and the pickup and dropoff location.

So how do I do that in SQL?

Thanks,

-Michelle
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform