>I have grid PAYROLL which represent the daily wages of each worker.
>In the grid is a column WAGES.
>Say, how can I get the sum of Peter's wages which is the sum of the column WAGES.
>I have tried SUM... as advised but it just sum up the all wages of everyone :(
>
>Could anybody help? I would like to avoid using SQL.
how about:
select sum(wages) from payroll where worker='peter' into array la1
if _tally>0
totalwage=la1[1]
else
totalwage=0
endif
Peter Cortiel