Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Design thoughts
Message
From
21/03/2007 15:11:48
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01206324
Message ID:
01206752
Views:
14
That worked great, thanks.

>Hi Jim,
>
>I still think that it shouldn't be complicated to do with one query.
>The Ownership table opened with alias 'cl' will return all the properties associated with current loan cl.loan_id = lnLoanID.
>The Ownership table opened with alias 'lnk' will return all loans associated with those properties by JOINing to 'cl' cl.prop_id = lnk.prop_id.
>The rest should be self-explanatory.
>
>
>SELECT Loan.* FROM Loan
>		JOIN Ownership lnk ON Loan.id = lnk.loan_id
>		JOIN Ownership cl ON cl.prop_id = lnk.prop_id AND cl.loan_id = lnLoanID
>	WHERE Loan.id <> lnLoanID
>
>
Jim Newsom
IT Director, ICG Inc.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform