SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Warning when inserting columns
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

venkath
Posting Yak Master

India
202 Posts

Posted - 06/05/2006 :  05:31:42  Show Profile  Reply with Quote
Hi guys

when i am inserting columns in a table, some of the rows are getting
afftected correctly while some other are showing the following warning.

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

could any one give the reason why it is coming...

Thanks in advance.

mr_mist
Grunnio

United Kingdom
1870 Posts

Posted - 06/05/2006 :  05:37:05  Show Profile  Visit mr_mist's Homepage  Reply with Quote
The message tells you why.

You must be doing some kind of SELECT with an aggregate function the result of which is being inserted. The message means that part of the result set was a NULL, but that is being ignored because of other data being SUMed (or similar).

-------
Moo. :)
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22713 Posts

Posted - 06/05/2006 :  07:05:51  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
That is just a warning and wont affect the resultset

Madhivanan

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

TG
Flowing Fount of Yak Knowledge

USA
5907 Posts

Posted - 06/05/2006 :  07:49:20  Show Profile  Reply with Quote
That message can be suppressed by issueing this statment:
set ansi_warnings off

however, if that statement is in an SP then the SP will be recompiled every time it is executed. Alternatively, you can issue the set statement in the session that is executing the stored procedure for the same result but with no recompile. But as madhivanan says, unless it is causing a problem with your application, you can just ignore it.

Be One with the Optimizer
TG
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000