|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
-- 适用于U8R10的B、C版(账务、报表、出纳、资产、工资):
declare @gsdm varchar(20),@zth varchar(20),@oldGSDM VARCHAR(20),@oldZTH varchar(20)
set @oldGSDM='01' --原单位代码
set @oldZTH ='01' --原账套号
set @gsdm ='001' --新单位代码
set @zth ='00101' --新账套号
------------------------------------------------------------------------------
-- select * from anyisys..anyigl where zth=@oldZTH
update anyisys..anyigl set zth=@zth ,dwdm=@gsdm where zth=@oldZTH
-- select * from PubModSetup where gsdm<>'99999999999999999999'
update pubmodsetup set gsdm=@gsdm where gsdm<>'99999999999999999999'
-- select * from pubyearhandle where gsdm<>'99999999999999999999' and modname<>'BA'
-- select * from pubyearhandle where gsdm<>'99999999999999999999' and modname='BA'
update pubyearhandle set gsdm=@gsdm,modname=substring(modname,1,2)+@zth where gsdm<>'99999999999999999999' and modname<>'BA'
update pubyearhandle set gsdm=@gsdm where gsdm<>'99999999999999999999' and modname='BA'
-- select * from GL_Pzml
update gl_pzml set gsdm=@gsdm,zth=@zth
-- select * from GL_Pznr
update gl_pznr set gsdm=@gsdm,zth=@zth
-- select * from GL_Pzflmx
update gl_pzflmx set gsdm=@gsdm,zth=@zth
-- select * from GL_Yeb
update gl_yeb set gsdm=@gsdm,zth=@zth
-- select * from GL_Yebk
update gl_yebk set gsdm=@gsdm,zth=@zth
-- select * from GL_Ztcs where hsdwdm<>'99999999999999999999'
-- select * from GL_Ztcs where hsdwdm<>'99999999999999999999' and ztbh<>'99999999999999999999'
update gl_ztcs set hsdwdm=@gsdm where hsdwdm<>'99999999999999999999'
update gl_ztcs set ztbh=@zth where hsdwdm<>'99999999999999999999' and ztbh<>'99999999999999999999'
-- select * from PubKjqj
update pubkjqj set gsdm=@gsdm,zth=@zth
-- select * from GL_KMXZLX where gsdm<>'99999999999999999999'
-- select * from GL_KMXZLX where gsdm='99999999999999999999'
update gl_kmxzlx set gsdm=@gsdm,zth=@zth where gsdm<>'99999999999999999999'
-- select * from GL_KMxx
update gl_kmxx set gsdm=@gsdm,zth=@zth
--select * from GL_FZXLB where gsdm<>'99999999999999999999'
--select * from GL_FZXLB where gsdm='99999999999999999999'
update gl_fzxlb set gsdm=@gsdm where gsdm<>'99999999999999999999'
-- select * from gl_fzxzl where gsdm<>'99999999999999999999'
update gl_fzxzl set gsdm=@gsdm where gsdm<>'99999999999999999999'
-- select * from gl_xmzl
update gl_xmzl set gsdm=@gsdm
-- select * from pubkszl
update pubkszl set gsdm=@gsdm
-- select * from pubgszl
update pubgszl set gsdm=@gsdm
-- select * from gl_pzzy
update gl_pzzy set gsdm=@gsdm,zth=@zth
-- select * from GL_ZDFL
update gl_zdfl set gsdm=@gsdm,zth=@zth
-- select * from GL_ZDFLmx
update gl_zdflmx set gsdm=@gsdm,zth=@zth
-- select * from gl_pzlx where gsdm<>'99999999999999999999'
update gl_pzlx set gsdm=@gsdm,zth=@zth where gsdm<>'99999999999999999999'
-- select * from gl_bz
update gl_bz set gsdm=@gsdm,zth=@zth
-- select * from gl_bzdmx
update gl_bz set gsdm=@gsdm
-- select * from gl_dlzgsml
update gl_dlzgsml set gsdm=@gsdm,zth=@zth
-- select * from gl_dlzgsnr
update gl_dlzgsnr set gsdm=@gsdm,zth=@zth
-- select * from gl_hskm
update gl_hskm set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_JZMBML
update GL_JZMBML set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_JZMBnr
update GL_JZMBnr set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_NotePZLog
update GL_NotePZLog set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_PZFJ
update GL_PZFJ set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_wlkm
update GL_wlkm set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_wlyw
update GL_wlyw set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_xmkm
update GL_xmkm set gsdm=@gsdm,zth=@zth
-- select * from dbo.GL_Yhdzd
update GL_Yhdzd set gsdm=@gsdm,zth=@zth
-------------------报表-----------------------------------------
-- select * from Rpt_Report where gsdm<>'99999999999999999999'
update Rpt_Report set gsdm=@gsdm,zth=@zth where gsdm<>'99999999999999999999'
-- select * from Rpt_Units_Relations
update Rpt_Units_Relations set gsdm=@gsdm,zth=@zth
--------------------------------------------------------------------
-- select * from pubbmxx
update pubbmxx set gsdm=@gsdm
-- select * from pubzjxz
update pubzjxz set gsdm=@gsdm
-- select * from zb_jsfs
update zb_jsfs set gsdm=@gsdm
-- select * from zb_yhzl
update zb_yhzl set gsdm=@gsdm
-- select * from zb_DWYEZJLY where gsdm<>'99999999999999999999'
update zb_DWYEZJLY set gsdm=@gsdm where gsdm<>'99999999999999999999'
-- select * from gl_xjllxm where gsdm<>'99999999999999999999'
update gl_xjllxm set gsdm=@gsdm where gsdm<>'99999999999999999999'
-- select * from gl_czy where gsdm=@oldGSDM
UPDATE gl_czy set gsdm=@gsdm where gsdm=@oldGSDM
-------------------出纳模块--------------------------------------------------
-- select * from dbo.CM_ztcs where gsdm<>'99999999999999999999'
update CM_bsqk set gsdm=@gsdm
update CM_BYJJHK set gsdm=@gsdm
update cm_CDHP set gsdm=@gsdm
update CM_FKzp set gsdm=@gsdm
update CM_Fzye set gsdm=@gsdm
update CM_hdJS set gsdm=@gsdm
update CM_JSFS set gsdm=@gsdm
update CM_jxqk set gsdm=@gsdm
update CM_kjqj set gsdm=@gsdm where gsdm<>'99999999999999999999'
update cm_kmye set gsdm=@gsdm
update cm_kmyek set gsdm=@gsdm
update CM_Pzml set gsdm=@gsdm
update CM_Pznr set gsdm=@gsdm
update CM_SFKXM set gsdm=@gsdm
update CM_SFPD set gsdm=@gsdm
update CM_SFPD_BK set gsdm=@gsdm
update CM_skzp set gsdm=@gsdm
update CM_XJDZd set gsdm=@gsdm
update dbo.CM_xjdzqkb set gsdm=@gsdm
update dbo.CM_XJPDB set gsdm=@gsdm
update dbo.CM_xjpdbgb set gsdm=@gsdm
update dbo.CM_xjpdd set gsdm=@gsdm
update dbo.CM_XJRJZ set gsdm=@gsdm
update dbo.CM_YETJB set gsdm=@gsdm
update dbo.CM_yhbp set gsdm=@gsdm
update dbo.CM_Yhdzd set gsdm=@gsdm
update dbo.cm_yhhp set gsdm=@gsdm
update dbo.cm_yhhp set gsdm=@gsdm
update dbo.cm_yhhp set gsdm=@gsdm
update dbo.CM_YHRJZ set gsdm=@gsdm
update dbo.Cm_YHZH set gsdm=@gsdm
update dbo.CM_YHZL set gsdm=@gsdm
update dbo.CM_YJZQ set gsdm=@gsdm
update dbo.CM_zpgz set gsdm=@gsdm
update dbo.CM_ZTCS set gsdm=@gsdm,ztbh=@zth where gsdm<>'99999999999999999999'
-------------------资产模块--------------------------------------------------:
-- select * from FA_Kpjg where gsdm<>'99999999999999999999'
update fa_bdd set gsdm=@gsdm
update FA_BDSQB set gsdm=@gsdm
update FA_BDSQMXB set gsdm=@gsdm
update dbo.FA_Bmzj set gsdm=@gsdm
update FA_CFDD set gsdm=@gsdm
update dbo.Fa_CodeList set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.Fa_Codetype set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Fssb set gsdm=@gsdm
update dbo.FA_Gdlb set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Gzl set gsdm=@gsdm
update dbo.FA_GZSQB set gsdm=@gsdm
update dbo.FA_GZSQMXB set gsdm=@gsdm
update dbo.FA_GZYSB set gsdm=@gsdm
update dbo.FA_Kp set gsdm=@gsdm
update dbo.fa_kpallbd set gsdm=@gsdm
update dbo.FA_Kpbak set gsdm=@gsdm
update dbo.fa_kpcfFssb set gsdm=@gsdm
update dbo.Fa_KPDBM set gsdm=@gsdm
update dbo.fa_kpcf set gsdm=@gsdm
update dbo.Fa_KPDBM_KPADD set gsdm=@gsdm
update dbo.Fa_KPDBM_KPADD_BDQ set gsdm=@gsdm
update dbo.Fa_KPDBM_ML set gsdm=@gsdm
update dbo.FA_KPGYS set gsdm=@gsdm
update dbo.Fa_KpImage set gsdm=@gsdm
update dbo.FA_Kpjg set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_KPMONTH set gsdm=@gsdm
update dbo.Fa_KPZJLY set gsdm=@gsdm
update dbo.Fa_KPZJLY_KPADD set gsdm=@gsdm
update dbo.FA_KPZJLY_KPADD_BDQ set gsdm=@gsdm
update dbo.FA_MBDYGX set gsdm=@gsdm
update dbo.FA_Pz set gsdm=@gsdm
update dbo.FA_PZMBML set gsdm=@gsdm
update dbo.FA_PZMBNR set gsdm=@gsdm
update dbo.FA_rq set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Shflow set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_SQFJB set gsdm=@gsdm
update dbo.FA_SY set gsdm=@gsdm
update dbo.FA_Syzk set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_TXMXX set gsdm=@gsdm
update dbo.FA_Ys set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Yslb set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Ysout set gsdm=@gsdm
update dbo.FA_ZCCZB set gsdm=@gsdm
update dbo.FA_ZCCZCJB set gsdm=@gsdm
update dbo.FA_ZCCZCJMXB set gsdm=@gsdm
update dbo.FA_ZCCZMXB set gsdm=@gsdm
update dbo.FA_ZCDBB set gsdm=@gsdm
update dbo.FA_ZCDBMXB set gsdm=@gsdm
update dbo.FA_ZCPD set gsdm=@gsdm
update dbo.FA_ZCPDJG set gsdm=@gsdm
update dbo.FA_ZCPGB set gsdm=@gsdm
update dbo.FA_ZCPGMXD set gsdm=@gsdm
update dbo.FA_ZCSYB set gsdm=@gsdm
update dbo.FA_ZCSYMXB set gsdm=@gsdm
update dbo.FA_ZCTJB set gsdm=@gsdm
update dbo.FA_ZCTJMXB set gsdm=@gsdm
update dbo.FA_Zjff set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Zjfp set gsdm=@gsdm
update dbo.FA_Zjfs set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.FA_Ztcs set gsdm=@gsdm,ztbh=@zth where gsdm<>'99999999999999999999'
-------------------工资模块--------------------------------------------------:
-- select *from GZ_Gzlb where gsdm<>'99999999999999999999'
update dbo.GZ_BFGZ set gsdm=@gsdm
update dbo.GZ_BMGZXMSZ set gsdm=@gsdm
update dbo.GZ_BMZYLXGZXKMModel set gsdm=@gsdm
update dbo.GZ_DWSWJ set gsdm=@gsdm
update dbo.gz_dygx set gsdm=@gsdm
update dbo.GZ_Ftlx set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.GZ_Ftlx_pz set gsdm=@gsdm
update dbo.GZ_GKPZMBML set gsdm=@gsdm
update dbo.GZ_GKPZMBNR set gsdm=@gsdm
update dbo.GZ_Grsds set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.GZ_Gsname set gsdm=@gsdm
update dbo.GZ_Gz set gsdm=@gsdm
update dbo.GZ_Gz_TFBAK set gsdm=@gsdm
update dbo.GZ_GZFFHZB_FA set gsdm=@gsdm
update dbo.GZ_Gzft set gsdm=@gsdm
update dbo.GZ_Gzlb set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.GZ_GzSH set gsdm=@gsdm
update dbo.GZ_GZTFPZSC set gsdm=@gsdm
update dbo.GZ_Month set gsdm=@gsdm
update dbo.Gz_SdsCycle set gsdm=@gsdm
update dbo.GZ_SHBZ set gsdm=@gsdm
update dbo.GZ_SHJG1 set gsdm=@gsdm
update dbo.GZ_SHJG2 set gsdm=@gsdm
update dbo.GZ_SHJG3 set gsdm=@gsdm
update dbo.GZ_T_GZ set gsdm=@gsdm
update dbo.GZ_XMZCFL set gsdm=@gsdm
update dbo.GZ_Yh set gsdm=@gsdm
update dbo.GZ_Yhdata set gsdm=@gsdm
update dbo.GZ_Ysgzx set gsdm=@gsdm where gsdm<>'99999999999999999999'
update dbo.GZ_ZBJKSJ set gsdm=@gsdm
update dbo.GZ_Zdyzbs set gsdm=@gsdm
update dbo.GZ_ZdyzbXX set gsdm=@gsdm
update dbo.GZ_Ztcs set gsdm=@gsdm,ztbh=@zth where gsdm<>'99999999999999999999'
update dbo.GZ_Zylx set gsdm=@gsdm
update dbo.GZ_Zyxx set gsdm=@gsdm
update dbo.GZ_Zyxxbd set gsdm=@gsdm where gsdm<>'99999999999999999999'
-----------------------------------------------------------------------------
-- By 王明利 2013.02.04
|
|