- You have a computer that is running Microsoft SQL Server 2005, and the computer has multiple processors.
- You run a query that contains an inner join.
- The inner join uses an equal operator to compare two columns.
- One of the columns has the INT data type. The other column has the BIGINT data type.
- The query returns values of the columns that are less than 0 or that are more than 4,294,967,295.
- The query generates a parallel execution plan.
Steps to reproduce the problemTo reproduce the problem, run the following statements in SQL Server 2005.
create table orders( c1 int )
declare @i int
while @i < 100000
insert orders values(@i)
create table t1(c1 int not null)
create table t2(c1 bigint not null)
insert t1 select c1 - 1000 from orders
insert t2 select c1 - 1000 from orders
-- The following statement would return an incorrect result
select * from t1 inner join t2
on t1.c1 = t2.c1 where t2.c1 + 1 < 0
option (maxdop 2, hash join)
Article ID: 935789 - Last Review: Apr 21, 2008 - Revision: 1