Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Four Table Join using same table twice.
Message
De
04/06/2002 13:44:24
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00664572
Message ID:
00664620
Vues:
20
>Try with something like this
>
>
>select *
>from ( LEADS
>     left outer join SOURCE on Leads.iSourceKey=Source.iSourcePrimaryKey )
>     left outer join NOTES on Leads.iNoteKey = Notes.iNotePrimaryKey
>
It works, except that it doesn't give me two sets of Notes, which is what I need. Rereading, I think I didn't state my problem clearly.

>>LEADS iLeadPrimaryKey, iSourceKey, iNoteKey
>>SOURCE iSourcePrimaryKey, iNoteKey
>>NOTES iNotePrimaryKey

Leads join Notes on leads.Notekey=notes.Notekey
Source join Notes on source.Notekey=notes.Notekey
Leads join Source on leads.SourceKey=source.SourceKey

I can accomplish any two of the joins, but somehow when trying the third, either the same notes result is returned twice, or no notes are returned.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform