Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SUM in Grid ( + and - )
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00502733
Message ID:
00502751
Vues:
18
>>Hi all,
>>
>>Is there a simply way to do this, i need to sum and to substract the value from one column if the other have 'D' or 'C' i can do that with scan endscan, but if the grid have some records it could be slow. The total is outside the grid. The grid is based in a view.
>>
>>Thank's
>>
>>João Batista
>>
>>Example:
>>
>>Column1 Column2
>>1000.0  D
>> 500.0  C
>>
>>Total - 500.0
>>
>
>Do a separate query on your view cursor
>
>
>sele sum(iif(column2 = 'C',-1 * column1,column1)) as sumcolumn1 from yourview to array yourarray
>
>
> Alek

sorry there was a missing parentheses
Alek
Alek Massey
- The only stupid question is one left unasked -
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform