码迷,mamicode.com
首页 > 数据库 > 详细

【应收账款】切换新数据库

时间:2014-10-26 19:37:35      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:sp   数据   bs   数据库   tt   table   nbsp   rom   c   

DELETE FROM YSDJ
DELETE FROM XDMX
DELETE FROM DZMX
DELETE FROM DZCY
DELETE FROM FPMX
DELETE FROM SKDMX
DELETE FROM SKMX
DELETE FROM JEMX
DELETE FROM LSFP
DELETE FROM LSTABLE
DELETE FROM HZMX

 insert into yszk2..ysdj(xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu)
select xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu from ysdj where dzbz=0 and qrbz!=2

insert into yszk2..ysdj(xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu)
select xsdh,dwid,jzrq,ysje,qrbz,‘1‘,drrq,beizhu from ysdj where dzbz=0 and qrbz=2

insert into yszk2..ysdj(xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu)
select xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu from ysdj where dzbz=1

insert into yszk2..ysdj(xsdh,dwid,jzrq,ysje,qrbz,dzbz,drrq,beizhu)
select xdh,dwid,jzrq,ysje,qrbz,dzbz,qrrq,beizhu from xdmx where dzbz=1 and qrbz!=2

insert into yszk2..fpmx(dzdh,dwid,zs,fplx,beizhu,fptt,fphm,fpje,skbz)
select dzdh,dwid,zs,fplx,kpdw,fptt,fphm,fpje,skbz from fpmx where skbz=0

【应收账款】切换新数据库

标签:sp   数据   bs   数据库   tt   table   nbsp   rom   c   

原文地址:http://www.cnblogs.com/nlg3413/p/4052537.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!