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

?????? ????????? ?????? ?????????
???? ???????: 285870 - ??? ???????? ???? ????? ????? ??? ???????.
????? ???: 101111 (sqlbug_70)
BUG #: 351761 (SHILOH_bugs)
????? ???? | ?? ????

?? ??? ??????

???????

?? ?? ?????? ????? UPDATE ????? ?????? ?? ?????? ?? ???? ???? ?????? ???????:
  • ????? ????????? ?? ???? ColA ? ?? ???? TabA.
  • ????????? ????? TabA ??? ????? ???????? ?????? TabB.
  • ???? ???? TabB.ColA ???? ?? ?? ?????????.
  • ?? ???? ?? ?? ??????? ????? ?? TabA ??? ??????? ????????.
  • ??? ??????? ??? ??????? ?? ???.

?????

?? ?? ????? ??? ????????? "??????? ????" ???????? ????? ???? UPDATE ????? ?????? "????? ???? ??? ????????".

????

SQL Server 2000

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

SQL Server 7.0

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


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

??? ?? ???? ?????? ?????????? ?? ??? ??????? ???? ??????? ??????? ?? ????:
   Version      File name       Platform
   -------------------------------------

   7.00.978     s70978i.exe     x86
   7.00.978     s70978a.exe     Alpha
				
??????: ???? ?????? ?????? ???? ????? ???? ?? ?????? ???? ????? ??? ??????? ??????? ?? ????? ????? ??? ????? ??????.

???? ??????

??????? ?????? ??? ??? ???????:
  • ??? ??? ???? ???????? OPTION (LOOP JOIN).

    - ?? -

  • ????? ???? ?? ??????? ???????.

?????

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

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

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

??????? ????

????? ???? ??? ???????? ????? ???? ???? ??? ????? ?????? ?????? ?? ???? ???? ????? ????? ?????. ????? ????? ???? ???? ?? ???? revisited ??? ???? ??? ???? ?????? ????? ????? ? ????? ?? ??? ??????. ???? ???? ?????? ??? ????? ????? ?? ?????? SQL Server ?? ????? ??? ?? ????? ???? ??? ???????? ????????.

???? ?????? ?????? ???????:
set nocount on
create table test(id int, pid int, fn varchar(256), rn varchar(8))
go
declare @c int
set @c = 1
insert into test values(0, NULL, 'root', 'root')
while @c < 10
begin
   insert into test values(@c, @c-1, NULL, cast(@c as varchar(8)))
   set @c = @c + 1
end
create unique clustered index idx_c_id on test(id)
go
update test
set fn = parent.fn + '/' + test.rn
from test(index=0) , test parent(index=0)
where test.pid = parent.id and test.fn is NULL --  and parent.fn <> ''
option(hash join,force order)
				
???? ??????? ?????? ?????? ??? ??? ???????:

--??????? ???????:
id          pid         rn       fn                                                                                                                                                                                                                                                               
----------- ----------- -------- ---- 
0           NULL        root     root
1           0           1        root/1
				
??? ?? ????? ?????? ??? ??? ??? ????? ???????:

--????? ??? ?????:
id          pid         rn       fn                                                                                                                                                                                                                                                               
----------- ----------- -------- ----
0           NULL        root     root
1           0           1        root/1
2           1           2        root/1/2
3           2           3        root/1/2/3
4           3           4        root/1/2/3/4
5           4           5        root/1/2/3/4/5
6           5           6        root/1/2/3/4/5/6
7           6           7        root/1/2/3/4/5/6/7
8           7           8        root/1/2/3/4/5/6/7/8
9           8           9        root/1/2/3/4/5/6/7/8/9

				

???????

???? ???????: 285870 - ????? ??? ??????: 03/?????/1424 - ??????: 3.1
????? ???
  • Microsoft SQL Server 2000 Standard Edition
  • Microsoft SQL Server 7.0 Standard Edition
????? ??????: 
kbmt kbbug kbfix KB285870 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????285870

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

 

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