BS3000J批量 反记账 反审核 的方法

1,检索数据库中 审核,记账,未执行,未终止的 订单(说明此单据仅仅是做到第三步,并没有发货!)

 

2,删除  发货单 中 发货单.通知单号=通知单.通知单单号 的发货单。

 

3,把1步检索出的,要反记账,反审核的单据列表,拷贝到  excel

 

4,

SD2000073
SD2000075
SD2000078
SD2000079
SD2000083
SD2000086
SD2000087
SD2000090
SD2000091
SD2000092

 

5,然后再在两边加入执行语句

 

UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000073 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000075 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000078 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000079 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000083 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000086 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000087 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000090 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000091 ';
UPDATE PSEND SET YS = '0' WHERE DJBH=' SD2000092 ';

 

 

6,然后再拷贝到TXT文件中把  TAB的“空格”  替换掉就成了

 

UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000073';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000075';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000078';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000079';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000083';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000086';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000087';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000090';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000091';
UPDATE PSEND SET YS = '0' WHERE DJBH='SD2000092';


UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000073';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000075';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000078';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000079';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000083';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000086';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000087';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000090';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000091';
UPDATE PSEND SET JZ = '0' WHERE DJBH='SD2000092';

 

7.看!!!!批量的语句!超简单!

你可能感兴趣的:(excel,数据库)