–oracle
update stockm
set stockm.current_cost=(select erpcost from aes_calist where TRIM(aes_calist.wh)=TRIM(stockm.WAREHOUSE) and TRIM(aes_calist.product)=TRIM(stockm.product))
where trim(stockm.product) in (select aes_calist.product from aes_calist)
and trim(stockm.WAREHOUSE) in (select aes_calist.wh from aes_calist)
–sqlserver
update lwj_temp_card
set 新售价=b.rtlprc
from lwj_temp_card a,goods b
where a.商品编号=b.code
–oracledeclare cursor cc is select wh,product,erpcost from aes_calist;begin for my in cc loopupdate stockmset stockm.current_cost=my.erpcostwhere TRIM(stockm.WAREHOUSE)=TRIM(my.wh)and TRIM(stockm.product)=TRIM(my.product);end loop;end ;
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/36274.html