Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQL not yiielding same result as Filter
Message
De
02/05/2000 08:25:50
 
 
À
02/05/2000 04:03:52
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00364987
Message ID:
00365016
Vues:
17
>In SQL, when you define a join condition i the way you're doing it, it comes out as a inner join. I.E. the result set contains the records that have match in both tables only. If there is a record from table 1 that the sql doesn't find a match in table 2, then it isn't included in the result set.
>
>In order to do what you're seeking, you have to explicitly make a left join, the syntax being:
>
>SELECT BALANCE.* FROM BALANCE left join PTYPES on BALANCE.TYPE=PTYPES.TYPE where EMPTY(PTYPES.TYPE) INTO DBF ANYTABLE

Thanks for the fix Francisco

my first reaction was "thats all very well, but how did it pick up the valic records?" but of course, they match in both tables, so no prob.

thanks again

Harry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform