批量修改数据sql

--insert into P_ZPROMOTION_DOC_ITEMS (AKTNR,MATNR,MINGROSS,MCRANK,MCUPRICE,MAXBAKTNR,MAXBPAMONT,MAXBPRICE,MINBAKTNR,MINBPAMONT,MINBPRICE) SELECT AKTNR4,MATNR,MINGROSS,MCRANK,MCUPRICE,MAXBAKTNR,MAXBPAMONT,MAXBPRICE,MINBAKTNR,MINBPAMONT,MINBPRICE FROM P_ZPROMOTION_SOURCE WHERE AKTNR4=5075

select * from P_ZPROMOTION_DOC_ITEMS where AKTNR='BL5075' and len (matnr)>0 --448 select * from P_ZPROMOTION_SOURCE where AKTNR4='5075' and matnr in (select matnr from P_ZPROMOTION_DOC_ITEMS where AKTNR='BL5075')

--批量修改数据

update P_ZPROMOTION_DOC_ITEMS set MINGROSS=b.MINGROSS,MCRANK=b.MCRANK,MCUPRICE=b.MCUPRICE, MAXBAKTNR=b.MAXBAKTNR,MAXBPAMONT=b.MAXBPAMONT,MAXBPRICE=b.MAXBPRICE,MINBAKTNR=b.MINBAKTNR, MINBPAMONT=b.MINBPAMONT,MINBPRICE=b.MINBPRICE from P_ZPROMOTION_DOC_ITEMS a,P_ZPROMOTION_SOURCE b where a.AKTNR='BL5075' and b.AKTNR4='5075' and a.matnr=b.matnr

上一篇:《阿里巴巴Java开发手册1.4.0》阅读总结与心得(五)


下一篇:Django上传excel表格并将数据写入数据库