User452040443 posted
Hi,
Try something like this:
select
[PO],
[Vendor],
[VendorRef],
[ItemCode],
[ItemDescription],
sum([POQty]) as POQty,
[POPrice],
[RecdQty]
from MyTable
group by grouping sets
( ( [PO], [Vendor], [VendorRef], [ItemCode], [ItemDescription], [POQty], [POPrice], [RecdQty] ),
( [PO], [ItemCode] ) )
Hope this help