I'm trying to create a sum of all the values returned in a column, i.e. I want to add up all the values of the column quantity. For some, no pun intended, reason this is driving me to fits.
This is my select statement:
select E.ItemCode, E.Dscription, E.Price, A.U_CardCode, A.U_DocNum, B.U_BaseType, b.u_qtyship
from RDR1 E inner join [@sh_shr1] b on e.DocEntry = b.U_BaseDoc and e.linenum = b.U_Baserow inner join [@sh_oshr] a on b.U_DocNum = a.U_DocNum
where E.DocEntry = 4
I want to add up the values in the column u_qtyship or even better, get the sume of b.u_qtyship * e.price
Any advise would be greatly appreciated.
This is my select statement:
select E.ItemCode, E.Dscription, E.Price, A.U_CardCode, A.U_DocNum, B.U_BaseType, b.u_qtyship
from RDR1 E inner join [@sh_shr1] b on e.DocEntry = b.U_BaseDoc and e.linenum = b.U_Baserow inner join [@sh_oshr] a on b.U_DocNum = a.U_DocNum
where E.DocEntry = 4
I want to add up the values in the column u_qtyship or even better, get the sume of b.u_qtyship * e.price
Any advise would be greatly appreciated.