newtofoxpro
Programmer
Code:
CREATE CURSOR CurTrn (TrnTpe c(10), TrnProd c(20), TrnQty n(15,2), TrnRate n(15,2), TrnRPer c(5), TrnAmt n(15,2))
INSERT INTO CurTrn VALUES ("SALE","PENCIL",10,4,'Pcs',50)
INSERT INTO CurTrn VALUES ("SALE","PENCIL",10,5,'Pcs',60)
INSERT INTO CurTrn VALUES ("FREE","PENCIL",10,0,' ',0)
SELECT TrnProd, SUM(TrnQty),TrnRate,TrnRPer,SUM(TrnAmt) FROM CurTrn GROUP BY 1
Result looking for
Pencil,30,5,Pcs,110.00
Anybody knows solution ?