多条检索记录的更新问题
select a.xh,a.xm,(b.kjje + Nvl(a.snjzje,0) - Nvl(a.ljbxje,0)) je into:ls_xh,:ls_xm,:ls_je from mwd_zggrzhxxk a,mwd_zggzksum b where a.xm=b.xm and (b.kjje + Nvl(a.snjzje,0) - Nvl(a.ljbxje,0))>0 and b.yyyy=:ls_yy;//第一条检索语句
update mwd_zggrzhxxk set snjzje=:ls_je,gzljje='',ljbxje='',dqgzje='' where xh=:ls_xh and xm=:ls_xm;//第二条更新语句
第一条检索语句检索出来有多条记录,怎么在第二条语句里实现全部更新啊?这个循环写不好了啊!~