Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help with SQL including a SUM....
Message
De
17/08/2000 18:11:51
 
 
À
17/08/2000 15:49:34
Peter Brama
West Pointe Enterprises
Detroit, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00406341
Message ID:
00406446
Vues:
35
The syntax you use for your left join is incorrect. You can use

select ...;
from apdetl;
left join appay on apdetl.apdetlid=appay.apdetlid ;
where apdetl.apmasid=apmas.apmasid

Or

select ...;
from apdetl;
where apdetl.apmasid=apmas.apmasid and apdetl.apdetlid=appay.apdetlid

HTH
>select apdetl.ivcdate, apdetl.ivcnum, apdetl.duedate, apdetl.amount, sum(appay.amount), apdetl.amount-sum(appay.amount) ;
>from apdetl left join appay ;
>where apdetl.apmasid=apmas.apmasid and apdetl.apdetlid=appay.apdetlid ;
>into cursor curLstApDetl ;
>order by apdetl.ivcdate
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform