Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated SQL
Message
De
12/08/1998 16:05:49
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00126184
Message ID:
00126229
Vues:
23
>>Do you want to SUM for particular Client_Num or for (Clint_Num+Client_Src)?
>
>Clien_num + Client_src. It's the combination that makes a unique entity, since clients can have multiple funding sources.
>
>-Michelle

select 1 as dummy, * from tmpbal into cursor tmp ;
union all select -1 as dummy, * from pc ;
union all select 1 as dummy, * from pay

select client_num,client_src,SUM(dummy*amount) as balance ;
from tmp ;
group by 1,2
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform