I keep getting this "warning" when I run certain scripts:
Warning: Null value is eliminated by an aggregate or other SET operation.
It's not a "fatal" error, so the script still runs, but it does kick out a message to my users, which I need to find a way around.
Here's an example of one of the scripts that gerenates this warning.
insert into #cte select [description], userfield1 as [sku], userfield2 as [cust] from series where scenarioid = @lm and (userfield1 <> '' or userfield2 <> '')
delete from #cte where exists (select sku, customer from series sr where sr.sku = #cte.sku and sr.customer = #cte.cust and scenarioid=5960)
delete from #cte where exists (select sku, customer from series sr left join observations ob on sr.seriesid = ob.seriesid where sr.sku = #cte.sku and sr.customer = #cte.cust and sr.scenarioid = @lm and sr.levelnum <> 0 group by sku, customer having sum(ob.uservalue01)>0)
The warning occurs as a result of the line:
delete from #cte where exists (select sku, customer from series sr left join observations ob on sr.seriesid = ob.seriesid where sr.sku = #cte.sku and sr.customer =
It has something to do with nulls being in the dataset that's getting summed... but I don't know how to account for the nulls so that I don't get this message. Any ideas?
WATYF
Start Free Trial