Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Warning: Null value is eliminated by an aggregate

Author  Topic 

miked1978
Starting Member

25 Posts

Posted - 2008-11-03 : 10:32:47
I get this message after I run my script. The script runs fine but I would like to get rid of this warning as it causes problems when I use this script in a DTS package.

Here is my Select statement (i'm sure its failing on wkly_eac:

select a.hull, a.cc, sum(a.wkly_eac) as wkly_eac, a.TOW, a.date1, b.pothrs as pothrs

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-03 : 10:36:04
You should use Isnull or Coalesce function for it.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-03 : 10:42:56
this is just a warning to indicate that your aggregation involves NULL values. to turn it off, just use below

http://msdn.microsoft.com/en-us/library/aa259213(SQL.80).aspx

Go to Top of Page
   

- Advertisement -