I need to return one recordset a column for each record but also another column for subtotal of that same column. This is something like how I've done it in VFP:
SELECT orderid, itemid, qty FROM itemtable WHERE orderid=123 INTO CURSOR cTItem
SELECT itemid, SUM(qty) AS subtotal FROM itemtable ;
WHERE orderid=123 GROUP BY itemid INTO CURSOR cTItem2
SELECT A.orderid, A.itemid, A.qty, B.subtotal ;
FROM cTItem A JOIN cTItem2 B ;
ON A.itemid=B.itemid ;
INTO CURSOR cWhatINeed
If the DB is now MSSQL and the app is now VB, how would I handle something like this? TIA.
It's "my" world. You're just living in it.