FIX: SELECT query that uses batch mode hash aggregate operator that counts multiple nullable columns returns bad results in SQL Server

Gilt für: SQL Server 2016 Enterprise CoreSQL Server 2016 EnterpriseSQL Server 2016 Developer

Symptoms


A SELECT query that uses a batch mode hash aggregate operator that counts multiple nullable columns in the query execution plan returns incorrect results in SQL Server. This may occur when you use column store indexes, although it depends on the query pattern. For example, you may notice it for queries that use a PIVOT clause.

Resolution


This fix is included in the following cumulative updates for SQL Server:

Cumulative Update 4 for SQL Server 2017

Cumulative Update 6 for SQL Server 2016 Service Pack 1

Cumulative Update 9 for SQL Server 2014 Service Pack 2

Status


Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References


Learn about the terminology Microsoft uses to describe software updates.