|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册账号
×
--select * from DBVIP.ufdata_061_2007.dbo.Department --部门
--select * from DBVIP.ufdata_061_2007.dbo.fa_Departments
delete from DBVIP.ufdata_061_2007.dbo.Department
go
insert into DBVIP.ufdata_061_2007.dbo.Department(cdepcode,bdepend,cdepname,idepgrade,cdepperson,cdepprop,cdepphone,cdepaddress,cdepmemo)
select cdepcode,bdepend,cdepname,idepgrade,cdepperson,cdepprop,cdepphone,cdepaddress,cdepmemo from Department
delete from DBVIP.ufdata_061_2007.dbo.fa_Departments
insert into DBVIP.ufdata_061_2007.dbo.fa_Departments
select * from fa_Departments
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_AssetTypes --资产类别
delete from DBVIP.ufdata_061_2007.dbo.fa_AssetTypes
go
insert into DBVIP.ufdata_061_2007.dbo.fa_AssetTypes
select * from fa_AssetTypes
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_Cards --卡片主表
delete from DBVIP.ufdata_061_2007.dbo.fa_Cards
go
insert into DBVIP.ufdata_061_2007.dbo.fa_Cards
(sCardID,sCardNum,sAssetNum,sAssetName,lOptID,iOptType,iNewType,sZWVoucherType,sZWVoucherNum,sDeptNum,sTypeNum,sOrgID,sOrgAddID,sOrgDisposeID,sDisposeReason,sStatusID,sDeprMethodID,
sCurrency,sDeprSubjectNum,sDeprSubjectName,sProjectNum,sProjectName,sStyle,dblBuildArea,lBuildNum,lMachinNum,dblMachinW,sSite,lLife,dStartdate,dInputDate,dTransDate,dDisposeDate,
iInputPeriod,iTransPeriod,iDisposePeriod,dblFCValue,dblExchangeRate,sOperator,sDisposer,dblNetValueAct,lDeprMonthsAct,dblCanWorkAct,dblLegacy,sVoucherNum,sEvaluateNum,dblValue,
dblDecDeprT,dblDecDepr,dblDecDeprRate,lDecDeprMonths,dblDecWorkT,dblDecPerDepr,dblBV,dblBVRate,dblCanWork,dblPerDepr,lUsedMonths,sWorkUnit,dblTransInDeprTCard,dblTransOutDeprTCard,
iVouchsNextMonthAct,sTransTypeNum,sTransDepteNum,sLockedBy,dblDecPreValueT,dblRetDecPreValueT)
select
sCardID,sCardNum,sAssetNum,sAssetName,lOptID,iOptType,iNewType,sZWVoucherType,sZWVoucherNum,sDeptNum,sTypeNum,sOrgID,sOrgAddID,sOrgDisposeID,sDisposeReason,sStatusID,sDeprMethodID,
sCurrency,sDeprSubjectNum,sDeprSubjectName,sProjectNum,sProjectName,sStyle,dblBuildArea,lBuildNum,lMachinNum,dblMachinW,sSite,lLife,dStartdate,dInputDate,dTransDate,dDisposeDate,
iInputPeriod,iTransPeriod,iDisposePeriod,dblFCValue,dblExchangeRate,sOperator,sDisposer,dblNetValueAct,lDeprMonthsAct,dblCanWorkAct,dblLegacy,sVoucherNum,sEvaluateNum,dblValue,
dblDecDeprT,dblDecDepr,dblDecDeprRate,lDecDeprMonths,dblDecWorkT,dblDecPerDepr,dblBV,dblBVRate,dblCanWork,dblPerDepr,lUsedMonths,sWorkUnit,dblTransInDeprTCard,dblTransOutDeprTCard,
iVouchsNextMonthAct,sTransTypeNum,sTransDepteNum,sLockedBy,dblDecPreValueT,dblRetDecPreValueT from fa_Cards
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_DeprTransactions--固定资产折旧数据表
delete from DBVIP.ufdata_061_2007.dbo.fa_DeprTransactions
go
insert into DBVIP.ufdata_061_2007.dbo.fa_DeprTransactions
select * from fa_DeprTransactions
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_Total--固定资产汇总表
delete from DBVIP.ufdata_061_2007.dbo.fa_Total
go
insert into DBVIP.ufdata_061_2007.dbo.fa_Total
select * from fa_Total
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_Objects --产生单据号等
delete from DBVIP.ufdata_061_2007.dbo.fa_Objects
insert into DBVIP.ufdata_061_2007.dbo.fa_Objects
select * from fa_Objects
go
delete from DBVIP.ufdata_061_2007.dbo.fa_AssetTypes
insert into DBVIP.ufdata_061_2007.dbo.fa_AssetTypes
select * from fa_AssetTypes
go
delete from DBVIP.ufdata_061_2007.dbo.fa_Origins
insert into DBVIP.ufdata_061_2007.dbo.fa_Origins
select * from fa_Origins
go
delete from DBVIP.ufdata_061_2007.dbo.fa_Status
insert into DBVIP.ufdata_061_2007.dbo.fa_Status
select * from fa_Status
go
delete from DBVIP.ufdata_061_2007.dbo.fa_ItemsManual
insert into DBVIP.ufdata_061_2007.dbo.fa_ItemsManual
select * from fa_ItemsManual
go
--select * from DBVIP.ufdata_061_2007.dbo.fa_Vouchers--变动单
delete from DBVIP.ufdata_061_2007.dbo.fa_Vouchers
insert into DBVIP.ufdata_061_2007.dbo.fa_Vouchers
select * from fa_Vouchers
go
---------------凭证相关-----------------------------------------
--select * from DBVIP.ufdata_061_2007.dbo.fa_DeprVoucherMain
delete from DBVIP.ufdata_061_2007.dbo.fa_DeprVoucherMain
insert into DBVIP.ufdata_061_2007.dbo.fa_DeprVoucherMain
select * from fa_DeprVoucherMain
--select * from DBVIP.ufdata_061_2007.dbo.fa_DeprVouchers
delete from DBVIP.ufdata_061_2007.dbo.fa_DeprVouchers
insert into DBVIP.ufdata_061_2007.dbo.fa_DeprVouchers
(lOptID,iPeriod,sDeptNum,sDeptName,sTypeNum,sTypeName,sProjectNum,sProjectName,sSubjectNum,sSubjectName,dblDebit,dblCredit,sLockedBy)
select lOptID,iPeriod,sDeptNum,sDeptName,sTypeNum,sTypeName,sProjectNum,sProjectName,sSubjectNum,sSubjectName,dblDebit,dblCredit,sLockedBy from fa_DeprVouchers
--select * from code
--select * from DBVIP.ufdata_061_2007.dbo.code
go
delete from DBVIP.ufdata_061_2007.dbo.code
go
insert into DBVIP.ufdata_061_2007.dbo.code
(cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_name,ccode_engl,igrade,bproperty,cbook_type,cbook_type_engl,chelp,cexch_name,cmeasure,bperson,bcus,bsup,bdept,bitem,cass_item,
br,be,cgather,bend,bexchange,bcash,bbank,bused,bd_c,dbegin,dend,itrans,bclose,cother,iotherused,bcDefine1,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,
bcDefine10,iViewItem,bGCJS,bCashItem)
select
cclass,cclass_engl,cclassany,cclassany_engl,ccode,ccode_name,ccode_engl,igrade,bproperty,cbook_type,cbook_type_engl,chelp,cexch_name,cmeasure,bperson,bcus,bsup,bdept,bitem,cass_item,
br,be,cgather,bend,bexchange,bcash,bbank,bused,bd_c,dbegin,dend,itrans,bclose,cother,iotherused,bcDefine1,bcDefine2,bcDefine3,bcDefine4,bcDefine5,bcDefine6,bcDefine7,bcDefine8,bcDefine9,
bcDefine10,iViewItem,bGCJS,bCashItem
from code
--select * from gl_accsum
--select * from DBVIP.ufdata_061_2007.dbo.gl_accsum
delete from DBVIP.ufdata_061_2007.dbo.gl_accsum
go
insert into DBVIP.ufdata_061_2007.dbo.gl_accsum
(ccode,cexch_name,iperiod,cbegind_c,cbegind_c_engl,mb,md,mc,cendd_c,cendd_c_engl,me,
mb_f,md_f,mc_f,me_f,nb_s,nd_s,nc_s,ne_s)
select
ccode,cexch_name,iperiod,cbegind_c,cbegind_c_engl,mb,md,mc,cendd_c,cendd_c_engl,me,
mb_f,md_f,mc_f,me_f,nb_s,nd_s,nc_s,ne_s
from gl_accsum
go
--select * from gl_accvouch
--select * from DBVIP.ufdata_061_2007.dbo.gl_accvouch
delete from DBVIP.ufdata_061_2007.dbo.gl_accvouch
go
insert into DBVIP.ufdata_061_2007.dbo.gl_accvouch
(iperiod,csign,isignseq,ino_id,inid,dbill_date,idoc,cbill,ccheck,cbook,ibook,ccashier,iflag,ctext1,ctext2,cdigest,ccode,cexch_name,md,mc,
md_f,mc_f,nfrat,nd_s,nc_s,csettle,cn_id,dt_date,cdept_id,cperson_id,ccus_id,csup_id,citem_id,citem_class,cname,ccode_equal,iflagbank,
iflagPerson,bdelete,coutaccset,ioutyear,coutsysname,coutsysver,doutbilldate,ioutperiod,coutsign,coutno_id,doutdate,coutbillsign,
coutid,bvouchedit,bvouchAddordele,bvouchmoneyhold,bvalueedit,bcodeedit,ccodecontrol,bPCSedit,bDeptedit,bItemedit,bCusSupInput,
cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10)
select
iperiod,csign,isignseq,ino_id,inid,dbill_date,idoc,cbill,ccheck,cbook,ibook,ccashier,iflag,ctext1,ctext2,cdigest,ccode,cexch_name,md,mc,
md_f,mc_f,nfrat,nd_s,nc_s,csettle,cn_id,dt_date,cdept_id,cperson_id,ccus_id,csup_id,citem_id,citem_class,cname,ccode_equal,iflagbank,
iflagPerson,bdelete,coutaccset,ioutyear,coutsysname,coutsysver,doutbilldate,ioutperiod,coutsign,coutno_id,doutdate,coutbillsign,
coutid,bvouchedit,bvouchAddordele,bvouchmoneyhold,bvalueedit,bcodeedit,ccodecontrol,bPCSedit,bDeptedit,bItemedit,bCusSupInput,
cDefine1,cDefine2,cDefine3,cDefine4,cDefine5,cDefine6,cDefine7,cDefine8,cDefine9,cDefine10
from gl_accvouch
go
------end---------凭证相关-----------------------------------------
--select * from DBVIP.ufdata_061_2007.dbo.GL_mend
update DBVIP.ufdata_061_2007.dbo.GL_mend set bflag=1 where iperiod>0 and iperiod<=12--自动结帐 2011帐套不能这么做
--注意:登录系统做完初始化再做
--select * from DBVIP.ufdata_061_2007.dbo.accInformation where cSysID = 'FA' and cName ='dWritableDate'
update DBVIP.ufdata_061_2007.dbo.accInformation set cvalue=b.cvalue
from DBVIP.ufdata_061_2007.dbo.accInformation a,(select * from accInformation where cSysID = 'FA' and cName ='dWritableDate') b
where a.cSysID=b.cSysID and a.cSysID = 'FA' and a.cName ='dWritableDate'
/*--相关表---------------------------------------------------------------------------------------------------------------------------
select * from fa_Cards --卡片主表
select * from fa_cards_Detail --卡片明细表
select * from fa_Departments --固定资产部门属性表
select * from fa_AssetTypes --资产类别
select * from fa_DeprList--固定资产折旧日志
select * from fa_DeprTransactions --固定资产折旧数据表
select * from fa_DeprTransactions_Detail --固定资产折旧数据明细表
select * from fa_DeprVoucherMain--固定资产折旧分配凭证主表
select * from fa_DeprVouchers--固定资产折旧分配凭证子表
select * from fa_DeptScale --固定资产部门比例构成表
select * from fa_Objects--固定资产对象表
fa_Vouchers--变动单
fa_Vouchers_Detail--变动单明细表
select * from fa_Total--固定资产汇总表
select * from fa_WorkLoad
|
|