Tuesday, May 10, 2011

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

Today when I was executing one of the crystal reports in my application. I came across an error message as “Warning: Null value is eliminated by an aggregate or other SET operation”. I then googled a lot and found that this error is coming when a field is having null values for which an aggregate function like sum,avd etc is executed in the SQL statement.


This error can be suppressed by adding the command as below prior to executing the SQL statement

SET ANSI_WARNINGS OFF