Hi,
Try this:
select t0.cardcode, t1.itemcode, t1.[year], t1.[month], sum(t1.nettamnt)[Sales], sum(t1.nettgp)[GP]
from ocrd t0 inner join [dbo].[@2yearbycarditem] t1 on t0.cardcode = t1.cardcode
WHERE t1.ItemCode =[%0]
Thanks & Regards,
Nagarajan
Hi,
Try this:
select t0.cardcode, t1.itemcode, t1.[year], t1.[month], sum(t1.nettamnt)[Sales], sum(t1.nettgp)[GP]
from ocrd t0 inner join [dbo].[@2yearbycarditem] t1 on t0.cardcode = t1.cardcode
WHERE t1.ItemCode =[%0]
Thanks & Regards,
Nagarajan