22,300
社区成员




begin tran
declare cr cursor for select px, k, s, g, n, x from #tt
open cr
fetch next from cr into @Px, @k, @S, @g ,@n , @x
while @@fetch_Status = 0
begin
if @px = 1
begin
update kuan
set fs1 = @stone ,
fs1 = @Guig,
fs1 = @Num,
fs1 = @xiangf
where Temcode = @kuanh
end else
if @px =2
begin
update kuan
set fs2 = @stone ,
fs2 = @Guig,
fs2 = @Num,
fs2 = @xiangf
where Temcode = @kuanh
end else
if @px =3
。。。。。。。。。。。。。
fetch next from cr into @Px, @k, @S, @g ,@n , @x
end
commit tran
close cr
deallocate cr
create index idx_01 on kuan(Temcode)