Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design thoughts
Message
De
21/03/2007 15:11:48
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01206324
Message ID:
01206752
Vues:
13
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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform