FIX: ?? ?????? ???? ?????? ????? ????? ??? ?????

?????? ????????? ?????? ?????????
???? ???????: 286788 - ??? ???????? ???? ????? ????? ??? ???????.
BUG #: 351513 (Shiloh_bugs)
????? ???: 101092 (sqlbug_70)
????? ???? | ?? ????

?? ??? ??????

???????

?? ??? ???? ???? ???? ??????? ?? ??? ?????? ???????? ? ???? ????? ??? ????? ??? ???? ???? ?????? ???????:
  • ?????? ????????? ????? Sub-SELECT ?????? ????.
  • ?????? Sub-SELECT ?????? COUNT(*).
  • ????? Sub-SELECT "???????? ANSI" ?? ???.
  • ????? ???? ???? FROM ?????? ??? Transact-SQL ?? Sub-SELECT.

????

SQL Server 2000

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? SQL Server 2000. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
290211INF: ????? ?????? ??? ???? ???? ???? ??????? SQL Server 2000

SQL Server 7.0

??? ??? ???????? ??? ?????? ??? ???? ???? ???? ?? Microsoft SQL Server 7.0. ?????? ??? ??????? ??????? ???? ??? ??? ??????? ?????? ?????? ?? "????? ??????? ?? Microsoft:
301511INF: ????? ?????? ??? ???? ???? ???? ??????? SQL Server 7.0

?????

???? Microsoft ?? ??? ????? ?? ?????? Microsoft ??????? ?? ????? ??? ???????.

SQL Server 2000
?? ????? ??? ??????? ???? ??? ?? SQL Server 2000 Service Pack 1.

SQL Server 7.0
?? ????? ??? ??????? ???? ??? ?? Microsoft SQL Server 7.0 ?????? ????? ?????? Service Pack 4.

??????? ????

????? ????? ??????? ? ????? ????????? ???????? ???:
CREATE TABLE  TABLE1( T1COL1 int NOT NULL PRIMARY KEY)
go
CREATE TABLE  TABLE2(
 T2COL1 int NOT NULL PRIMARY KEY,
 T2COL2 int NOT NULL )
go

CREATE TABLE TABLE3(
	T3COL1 int NOT NULL)
go
Insert into TABLE1(T1COL1) values(4)
Insert into TABLE1(T1COL1) values(3)
Insert into TABLE2(T2COL1, T2COL2) values(5, 3)
Insert into TABLE2(T2COL1, T2COL2) values(6, 4)
Insert into TABLE3(T3COL1) values(6)
go

-------------- REPRO SCRIPT (Correct result would be 0,1) -------------
declare test cursor keyset for Select (select count(*)
      from dbo.TABLE2 as T2 join dbo.TABLE3 as T3 on T3.T3COL1 = T2.T2COL1
      where T2.T2COL2 = T1.T1COL1) as Para
 from dbo.TABLE1 as T1
open test
fetch test
fetch test
deallocate test


--------------- Workaround (Join condition moved to WHERE clause) ----------------
declare test cursor keyset local for Select (select count(*)
      from dbo.TABLE2 as T2, dbo.TABLE3 as T3 
      where T2.T2COL2 = T1.T1COL1 and T3.T3COL1 = T2.T2COL1) as Para
       from dbo.TABLE1 as T1

open test
fetch test
fetch test
deallocate test
				

???????

???? ???????: 286788 - ????? ??? ??????: 06/?????/1424 - ??????: 3.2
????? ???
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
????? ??????: 
kbmt kbbug kbfix kbsqlserv2000sp1fix KB286788 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????286788

????? ???????

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com