Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where filter on file in SQL Left Outer join
Message
De
23/08/2005 05:57:16
 
 
À
23/08/2005 05:45:16
Richard Candeland
Richard Candeland Software Services
Keighley, Royaume Uni
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01042840
Message ID:
01042843
Vues:
21
Richard

Maybe you answered this yourself. What happens if you change the

"where C.lastpaid > dlDate" to "And C.lastpaid > dlDate"?

I imagine the way you have it, you'll only get results when C.lastpaid > dlDate - period.

HTH

Terry

>I have a 3 file query. For every record in file A, there is a record in file B, but only some records in files A/B have a record in file C.
>
>In VFP 6 I had a query with a left outer join to file C and a where filter on file C:
>
>select ....
> from A join B on A.memb_no = B.memb_no ;
> left outer join C on A.memb_no = C.memb_no ;
> where C.lastpaid > dlDate
>
>This produced the result I wanted: All records from file A where there was either no record in file C or there was a record in file C and field lastpaid had a date later than variable dlDate.
>
>In VPF 8, the result is different. I lose all the records from file A where there is no record in file C.
>
>I can see now that my SQL syntax was sort of ambiguous, but what should it be? Is it possible to get what I want in a single SQL statement?
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform