Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
An SQL Challenge (it's a challenge for me anyway)
Message
From
22/10/1997 11:35:30
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00055877
Message ID:
00056046
Views:
32
>>>select membership.name;
>>> from membership;
>>> where membership.name = membership.name;
>>> and membership.city = membership.city;
>>> and membership.ssn <> membership.ssn;
>>
>>Yeah- I was hoping to do something like this, but this would result in a circular relation ship.
>>
>>I believe that the ultimate solution will involve several generations of sub tables and complex, multi field indexes.
>>
>>Thanks again for your input.
>
>Erik,
>
>It is perfectly valid to join a table to itself (though I may have the syntax wrong).
>
>I hope you find what you are looking for.

Yeah, I join tables to themselves regularly (this is called a unary relationship), (and I think I included the correct syntax in my response), but you can't do it twice, on two different fields, in the same query. The multiple joins are what creates the circular relatonship, just like when you join two different tables on two different fields.
Thanks again for your suggestion.
Erik Moore
Clientelligence
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform