我想用光标替换下面的while循环,我尝试了很多例子,但到目前为止我没有成功,你能帮我吗?
set @tableboundary =( select count(*) as counts from @From_T)
while @counter < @tableboundary
begin
set @Enti = (select Entities from @From_T where id= @counter)
Insert into @Temp_Tamale ( Entities) select value FROM MarMo.dbo.udf_ParseInto(@Enti, ',', '', '')
set @counter = @counter + 1
end