SQL Server Update Statement error: Warning: Null value is eliminated by an aggregate or other SET operation.
Posted on 2011-03-08
When I run this I get the error: Warning: Null value is eliminated by an aggregate or other SET operation.
I thought the isnull function would remove the error but it's not. The query is actually running but I don't want the warning. How can I handle this?
set PROGRAM_END_DATE = isnull(
(SELECT max(ef.END_DT) FROM AP_FACT..EN_FACT ef
where hb.program_assignment_id = ef.src_program_assignment_id
and ef.dim_program_id = 194 and
ef.END_DT < '2099-12-31 00:00:00.000'),'2099-12-31 00:00:00.000')
FROM #hbinterval hb
Thanks as always for your help,