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 2000 Forums
 Transact-SQL (2000)
 Getting ERROR msg when creating Temp table

Author  Topic 

latingntlman
Yak Posting Veteran

96 Posts

Posted - 2006-12-07 : 12:08:10
I'm creating a temporary table b/c I don't have the credentials to create actual tables.

The code seems to dump the data according to criteria to the temp table, but I get a warning message:

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

What could possibly be????

any help is appreciated.

john

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2006-12-07 : 12:37:15
best post your code....but are you summing or averaging a numeric field which COULD/DOES contain nulls???
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-12-07 : 12:37:43
In your query, if you are using aggregate functions like Sum(), Count() etc. use IsNull() function inside it like below:

Select Sum(IsNull(Col1, 0)),...
from Tbl


Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

latingntlman
Yak Posting Veteran

96 Posts

Posted - 2006-12-07 : 13:56:59
The Is Null inside worked!! grrrrrreat!!

thx a bunch.


Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-12-08 : 06:19:02
<<
Warning: Null value is eliminated by an aggregate or other SET operation.
>>

It is just warning you dont need to worry about it much

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -