declare @au_id111 int
declare @of_file111 varchar(255)
declare @ho_id varchar(255)
declare @tcc_id varchar(255)
declare @au_id1111 varchar(255)
declare @id int
set @sql='select max(auto_id) as auto_id into temp_auid from hl_map_tl_p3_'+@sub
exec(@sql)
set @id=(select auto_id from temp_auid)
set @au_id111=1
while @au_id111<=@id
begin
set @ho_id='null'
set @tcc_id='null'
set @au_id1111=@au_id111
set @sql='set @of_file111=(select of_file from hl_map_tl_p3_'+@sub+' where auto_id=@au_id111)'
exec(@sql)
set @sql='set @ho_id=(select holink_id from ho_link_p3_'+@sub+' where ( of_file=@of_file111 and from_hoid=(select from_hoid from hl_map_tl_p3_'+@sub+' where auto_id=@au_id111) and to_hoid=(select to_hoid from hl_map_tl_p3_'+@sub+' where auto_id=@au_id111)))'
exec(@sql)
set @sql='set @tcc_id=(select [id] from link_all where (fnode=(select from_tccnode from hl_map_tl_p3_'+@sub+' where auto_id=@au_id111) and tnode=(select to_tccnode from hl_map_tl_p3_'+@sub+' where auto_id=@au_id111)))'
exec(@sql)
set @sql='update hl_map_tl_p3_'+@sub+' set holink_id= '''+@ho_id+''' where auto_id= '''+@au_id1111+''''
exec(@sql)
set @sql='update hl_map_tl_p3_'+@sub+' set tcclink_id= '''+@tcc_id+''' where auto_id= '''+@au_id1111+''''
exec(@sql)
set @au_id111=@au_id111+1
continue
end消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@au_id111'。
消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@of_file111'。
消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@au_id111'。
消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@au_id111'。
消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@au_id111'。
消息 137,级别 15,状态 2,第 1 行
必须声明变量 '@au_id111'。
请问各位高手我错在哪了