Sie sind auf Seite 1von 1

select

b.FK_iwItemsREN [Item Code],


dbo.udf_getitemdescription(b.FK_iwItemsREN) [Item Description],
sum(b.renqty) [Quantity],
B.renprice [Price],
sum(B.renprice*B.renqty) [Amount]
from pspatinv A
inner join
psPatitem B on b.FK_TRXNO = a.PK_TRXNO
where dbo.udf_GetFullName(a.fk_emdpatients)= 'LUBONG, MIRIAM RACAMADA'
and a.rendate between '01/03/2020' and '01/06/2020'
group by FK_iwItemsREN, B.renprice
ORDER BY b.FK_iwItemsREN

Das könnte Ihnen auch gefallen