Hi friends
Select [I] as Item#,[ExRm],[ExWip],[ExRec],[Rework],[ExQuaQur]
from(
SELECT T0.ItemCode as I, T0.[OnHand] as St ,T0.[WhsCode] as W
FROM OITW T0 WHERE T0.[ItemCode] ='3023081')S
PIVOT
(SUM(ST) FOR W IN ([ExRec],[ExRm],[ExWip],[Rework],[ExQuaQur])) P
I run above query i got result like this
Item# ExRm ExWip ExRec Rework ExQuaQur Total
A00001 49065.000000 8805.000000 0.000000 2.000000 0.000000 ?
Here i need Total column of this 5 warehosue and i need onhand sock .is it possible