Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Join three tables
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Join three tables
Divers
Thread ID:
00488912
Message ID:
00488912
Vues:
35
Hello,

I'd like to combine the data from three tables but the third table will not always have a match in the first table.

Tabletwo should always have a match in tableone.(if not someone made a mistake)

This select only gives me the records from tableone that have a match in both tabletwo and tablethree.

***begin select
Select tableone.horsename, tableone.acctnumber, tableone.syndicatenumber, tabletwo.acctname, tablethree.syndicatename from tableone, tabletwo, tablethree where tableone.yearbred = 2001 and Tableone.acct_no = tabletwo.acct_no and tableone.syndicatenumber = tablethree.syndicatenumber
***end select

Is there a join that will give me all the records in tableone with either matching data in tabletwo and tablethree or null values in the fields where there are no matching data.

TIA,

Jim Harvey
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform