Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Four Table Join using same table twice.
Message
From
04/06/2002 13:44:24
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00664572
Message ID:
00664620
Views:
21
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform