Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Complicated SQL
Message
De
12/08/1998 16:18:00
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00126184
Message ID:
00126242
Vues:
25
>>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
>
>If I'm reading that right, it will give me each client with the total of everyone's balances. Not quite there, but you've giving me something to work with. I'll think on this some more.
>
No, look carefully, please. Dummy=1 or -1, i.e. you get needed result immediately.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform