I am having following update trigger:UPDATE dbo.averageset dbo.average.average = jcd.[Total Average], dbo.average.feedback = jcd.[No. of Feedback]from dbo.average INNER JOIN (Select CONVERT(decimal(15, 2), (AVG(q1) + AVG(q2) + AVG(q3) + AVG(q4) + AVG(q5) + AVG(q6) + AVG(q7) + AVG(q8)) / 8.0) AS [Total Average], COUNT(ID) AS [No. of Feedback] FROM dbo.job_content_designgroup by dept) jcdon dbo.average.dept_group = 'A' and dbo.average.dept = jcd.dept
Everything is OK here, except last line cause whenever am trying to run this query, am getting following error message:Server: Msg 207, Level 16, State 3, Line 1Invalid column name 'dept'.
Please help!Daipayan