it should be Temp2 insteadUPDATE S1SETS1.Sales = ISNULL(STemp2.Sales, 0),S1.RGU_Count = ISNULL(STemp2.RGU_count, 0)From #SkillSummary1 S1Left outer join( Select SUM(Sales) Sales,SUM(RGU_Count) RGU_Count,SkillFrom #Sales SWhere S.Skill = '309'GROUP BYS.Skill) Temp2ON Temp2.Skill = S1.Skill
------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/