alter proc demo_proc
as
begin
declare updateCursor cursor for
select jhlsh from jgpj_khjh_jbxx where qyzt='1' and qsyf is not null
open updateCursor
declare @jhlsh varchar(64)
fetch next from updateCursor into @jhlsh
while @@FETCH_STATUS=0
begin
print @jhlsh
update jgpj_khjh_jbxx set JHMC=REPLACE(JHMC,'计划','plan') where JHLSH=@jhlsh
fetch next from updatecursor into @jhlsh
end
close updatecursor
deallocate updatecursor
end
as
begin
declare updateCursor cursor for
select jhlsh from jgpj_khjh_jbxx where qyzt='1' and qsyf is not null
open updateCursor
declare @jhlsh varchar(64)
fetch next from updateCursor into @jhlsh
while @@FETCH_STATUS=0
begin
print @jhlsh
update jgpj_khjh_jbxx set JHMC=REPLACE(JHMC,'计划','plan') where JHLSH=@jhlsh
fetch next from updatecursor into @jhlsh
end
close updatecursor
deallocate updatecursor
end