Hi to all... i have this select statement using PIVOT and its working great...
i would like to add a SUM column which would sum up [4],[5],[6],

columns...
select statement output below
Select INUMBR,Class,IDSCCD,Descr,OO,ISNULL([4],0) AS [4], ISNULL([5],0) AS[5] , ISNULL([6],0) AS [6], ISNULL(

,0) AS

From (
select convert(varchar,x.INUMBR) as 'INUMBR',x.ICLAS Class,IDSCCD, Replace(x.IDESCR, '"', '') as Descr,
y.IBPOOQ as OO,y.ISTORE as 'Store', y.IBHAND as 'OH'
FROM AS4001.HARTMMS.MM750LIB.INVMST x, AS4001.HARTMMS.MM750LIB.INVBAL y
where
x.INUMBR = y.INUMBR group by x.INUMBR,x.ICLAS,IDSCCD, x.IDESCR,y.IBPOOQ, y.ISTORE, y.IBHAND
) as SourceTable
PIVOT (
MAX(OH)
FOR Store in ([4], [5], [6],

)) AS Store
order by 1, 2
like to add SUM(4-8)
numbr class Desc OO SUM(4-8) 4 5 6 8
102717 704 D MAGIC .00 .00 .00 .00 .00
102718 704 D DRAW .00 .00 .00 .00 .00
102723 704 D 4 PCE .00 .00 .00 .00 .00
102725 702 D PRETT .00 .00 2.00 .00 .00
103700 517 D (UPC) .00 .00 .00 .00 3.00
103704 517 D ROYA .00 .00 .00 .00 .00
thanking you in advance
Rino