Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Select joining same table multiple times
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00388673
Message ID:
00388957
Views:
7
>>Geeze! One more time. I will get the copy-paste-edit right this time:
>>select A.ContractID, ;
>>   B.LastName LN1, C.LastName LN2, D.LastName LN3 ;
>>   E.LastName LN4, F.LastName LN5, G.LastName LN6 ;
>>   from Contracts A ;
>>      left join Customer B on A.CustID1 = B.CustID ;
>>      left join Customer C on A.CustID2 = C.CustID ;
>>      left join Customer D on A.CustID3 = D.CustID ;
>>      left join Customer E on A.CustID4 = E.CustID ;
>>      left join Customer F on A.CustID5 = F.CustID ;
>>      left join Customer G on A.CustID6 = G.CustID ;
>> order by 1
>
>Well dang it all. I think you got the point. I give up. Good night.

Thanks for your deligence in sending your response. Your idea worked great. I forgot about using an alias for each of the custids' from the customer table. Thanks again.
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform