>>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 -