Hi,

I want to update a table column with the output of a select query. The query Iam using is

Select B.COMPCODE,b.seriescd,b.aono,aovalue,
sum(orderqty*basicprice) gross
From SaAo0 a,SaAo1 b
Where a.compcode=b.compcode
and a.branchcd=b.branchcd
and a.seriescd=b.seriescd
and a.aono=b.aono
And b.BranchCd = 'A1' And b.SeriesCd in ('AO','SAO','A2E')
and aostatus<>'C'
and b.aono like '2001%'
group by b.compcode,b.aono,b.seriescd,aovalue
having (aovalue)<>sum(orderqty*basicprice)

from the result I want to update like

update saao0 set aovalue with the result of the query "GROSS" How can I do can you please help me.

Thanks.