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:57:44
 
 
To
04/06/2002 13:15:23
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00664572
Message ID:
00664629
Views:
24
>If you're using the same twice as if it was two tables, you should give this second instance of the table a different alias. If I understood well,
>
>select * from leads ;
> {left/full/right} join leads on Leads.iSourceKey=Source.iSourcePrimaryKey;
> ... join NOTES on Leads.iNoteKey = Notes.iNotePrimaryKey ;
> ... join source s2 on S2.iNoteKey = Notes.iNotePrimaryKey

Notes rather than Source, but yes, that's the problem and the solution. I guess VFP is clobbering the two instances of Notes.iNotePrimarykey. *Sigh* I overlooked something so simple(aliasing) that I've done before. Thanks.
Previous
Reply
Map
View

Click here to load this message in the networking platform