PRB: Unexpected Warning About Eliminating NULLs from Aggregate (317312)
The information in this article applies to:
- Microsoft SQL Server 2000 (all editions)
This article was previously published under Q317312 SYMPTOMS
If you run a query that contains an aggregate function in the subquery, and if the subquery returns a non-NULL column, it may be possible for the query as a whole to generate the following warning message:
Msg 8153
Warning: Null value is eliminated by an aggregate or other SET operation.
CAUSE
In certain cases, SQL Server performs a transformation that moves the calculation of the aggregate after the join used to process the subquery. If the subquery ever returns an empty result set, SQL Server replaces the value for the subquery with a NULL, so the aggregate encounters the NULL value that it would not have processed if SQL Server processed the aggregate prior to the join.
STATUS
This behavior is by design. If you encounter the warning message shown in the "Symptoms" section under the conditions described in the "Cause" section, you can ignore the message.
Modification Type: | Major | Last Reviewed: | 9/25/2003 |
---|
Keywords: | kbnofix kbprb KB317312 |
---|
|