Applies ToSQL Server 2014 Enterprise - duplicate (do not use) SQL Server 2014 Developer - duplicate (do not use) SQL Server 2014 Standard - duplicate (do not use) SQL Server 2014 Web - duplicate (do not use)

Symptoms

Assume that you have a table that contains a DATE data type column, and you have implemented Clustered Column Store Index (CCSI) on this table in Microsoft SQL Server 2014. When you try to query the table by using the DATE data type as a qualifier, incorrect data may be returned.For example:create table tab2(c1 int, c2 date, c3 varchar(10))CREATE CLUSTERED COLUMNSTORE INDEX [CCI_tab2] ON [tab2] WITH (DROP_EXISTING = OFF)GOselect *FROM tab2 S -- Table with clustered columnstore indexWHERE S.c2 = @date -- variable of Date datatype

Resolution

Service pack information

To resolve this issue, obtain Service Pack 1 for SQL Server 2014.

For more information about SQL Server 2014 Service Pack 1 (SP1), see bugs that are fixed in SQL Server 2014 Service Pack 1.

Cumulative Update information

This issue was first fixed in the following cumulative update of SQL Server.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

More Information

Use the following code to reproduce this issue:create table tab1(c1 int, c2 date)insert into tab1values (1 , '2000-01-01')CREATE NONCLUSTERED INDEX [idxtab1c2] ON tab1( c2 ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)create table tab2(c1 int, c2 date, c3 varchar(10))insert into tab2values (1, '2000-01-01', 'test')CREATE CLUSTERED COLUMNSTORE INDEX [CCI_tab2] ON [tab2] WITH (DROP_EXISTING = OFF)GOcreate table t([runId] int not null, [scalingFactor] float not null)-- REPRO QUERY. Below batch is expected to return a row but we don’t get ittruncate table tDECLARE @date DATE, @numDates INTINSERT INTO t VALUES(1, 1)DECLARE @date DATE, @numDates INTSELECT @date = max(R.c2) , @numDates = COUNT(distinct R.c2)FROM tab1 R INNER JOIN t D ON R.c1 = D.runIdselect *FROM tab2 S -- CCIWHERE S.c2 = @date

Status

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

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.