all groups > sql server programming > october 2005 >
You're in the

sql server programming

group:

what does this mean...



what does this mean... ari
10/14/2005 11:09:03 PM
sql server programming: hey all,

i was running an update sql batch file in query analyzer and got the
following warning:

Warning: Null value is eliminated by an aggregate or other SET operation.

is this saying that this happened or has to happen?

thanks,
Re: what does this mean... David Gugick
10/15/2005 12:00:00 AM
[quoted text, click to view]

It means you had a null value in a column to which you were applying an
aggregate. It means the NULL value was ignored. Whether of not you
really want the NULL value in the column is another story. You ocan
elimiate the warning by cleaning up the data if that's the problem, or
adding a WHERE ColName IS NOT NULL to the query to eliminate them. This
example produces the message:

create table #test (col1 int)
insert into #test values (1)
insert into #test values (2)
insert into #test values (3)
insert into #test values (null)

select SUM(col1) from #test
drop table #test

-----------
7

(1 row(s) affected)

Warning: Null value is eliminated by an aggregate or other SET
operation.


--
David Gugick
Quest Software
www.imceda.com
www.quest.com
AddThis Social Bookmark Button