invnum name qty ------ ---- --- 001 AA 2 002 AA 3 001 BB 1 001 AA 5 002 BB 6 001 CC 7Currently I issue a SQL select like this:
select * from myTable where invnum=="001" into cursor myCursor readwritethen I use the TOTAL command on myCursor to get the folowing result:
invnum name qty ------ ---- --- 001 AA 7 001 BB 1 001 CC 7My question is: Is there any way to incorporate the total command into the SQL select statement to output the desired totaled table?