2,596
社区成员
发帖
与我相关
我的任务
分享
create table #tmp_deposit
(
id numeric(7,0) identity,
no int,
b_account varchar(32),
old_organ varchar(80)
)
declare @num int
select @num=count(*) from #tmp_add
declare @i int
select @i=1
while (@i<=@num)
begin
......(写#tmp_deposit)
truncate table #tmp_deposit
select @i=@i+1
end
drop table #tmp_deposit
手误declare @num int
select @num=count(*) from #tmp_add
declare @i int
select @i=1
while (@i<=@num)
begin
create table #tmp_deposit
(
id numeric(7,0) identity,
no int,
b_account varchar(32),
old_organ varchar(80)
)
......(写#tmp_deposit)
truncate table #tmp_deposit
select @i=@i+1
end
drop table #tmp_deposit
create table #tmp_deposit
(
id numeric(7,0) identity,
no int,
b_account varchar(32),
old_organ varchar(80)
)
declare @num int
select @num=count(*) from #tmp_add
declare @i int
select @i=1
while (@i<=@num)
begin
truncate table #tmp_deposit -- sybase可能不支持这个语句,改用 delete from #tmp_deposit
......(写#tmp_deposit)
select @i=@i+1
end