热门关键词用友NC 用友U9 用友U8 T+ 好业财 T3 好会计

    详细信息

    您现在的位置:网站首页 >> 百科问答 >> 详细信息

    用友U8财务数据降级到T3版本SQL脚本

    发布时间:2024-11-18  

    人工客服

    特价活动:>>>> 用友U8、T6、T+、T3软件产品4折优惠,畅捷通T+cloud、好会计、易代账、好业财、好生意云产品6-8折优惠 


    用友U8财务数据降级到T3版本SQL脚本
    /*手工设置内容:权限以及打印信息,如果U8是账套库不是年度库需要对导入的年度区分,如果在导入过程中期初余额可能对账不平的话,直接做T3账套的年结就可以,然后在导入凭证,这个没有结算方式,要手工增加下,要不修改凭证就会报错*/
    /*旧帐套006导入到新帐套001中*/
    delete from [UFDATA_001_2013].[dbo].[dsign]
    delete from [UFDATA_001_2013].[dbo].[code]
    delete from [UFDATA_001_2013].[dbo].[Customer]
    delete from [UFDATA_001_2013].[dbo].[CustomerClass]
    delete from [UFDATA_001_2013].[dbo].[Department]
    delete from [UFDATA_001_2013].[dbo].[Person]
    delete from [UFDATA_001_2013].[dbo].[fitem]
    delete from [UFDATA_001_2013].[dbo].[fitemss97class]
    delete from [UFDATA_001_2013].[dbo].[fitemss97]
    delete from [UFDATA_001_2013].[dbo].[GL_accvouch]
    delete from [UFDATA_001_2013].[dbo].[GL_accsum]
    delete from [UFDATA_001_2013].[dbo].[GL_accass]
    delete from [UFDATA_001_2013].[dbo].[vendorClass]
    delete from [UFDATA_001_2013].[dbo].[vendor]
    delete from [UFDATA_001_2013].[dbo].[hr_hi_person]
    go
    --插入凭证类别
    insert into [UFDATA_001_2013].[dbo].[dsign](csign,isignseq,ctext,itype,iotherused)
    select csign,isignseq,ctext,itype,iotherused from [ufdata_006_2013].[dbo].[dsign]
    go
    --插入凭证类别
    --插入会计科目
    INSERT INTO [UFDATA_001_2013].[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 [ufdata_006_2013].[dbo].[code]
    /*where  iyear=2015  年度库时使用 */
    go
    --插入会计科目
    --客户分类
    INSERT INTO [UFDATA_001_2013].[dbo].[CustomerClass]([cCCCode], [cCCName], [iCCGrade], [bCCEnd])
    SELECT [cCCCode], [cCCName], [iCCGrade], [bCCEnd] FROM [ufdata_006_2013].[dbo].[CustomerClass]
    go
    --客户分类
    --客户档案
    INSERT INTO [UFDATA_001_2013].[dbo].[Customer]
    ([cCusCode],[cCusName],[cCusAbbName],[cCCCode],[cDCCode],[cTrade],[cCusAddress],[cCusPostCode],[cCusRegCode],
    [cCusBank],[cCusAccount],[dCusDevDate],[cCusLPerson],[cCusEmail],[cCusPerson],[cCusPhone],[cCusFax],[cCusBP],
    [cCusHand],[cCusPPerson],[iCusDisRate],[cCusCreGrade],[iCusCreLine],[iCusCreDate],[cCusPayCond],[cCusOAddress],
    [cCusOType],[cCusHeadCode],[cCusWhCode],[cCusDepart],[iARMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],
    [dEndDate],[iFrequency],[cCusDefine1],[cCusDefine2],[cCusDefine3],[iCostGrade])
    SELECT
    [cCusCode],[cCusName],[cCusAbbName],[cCCCode],[cDCCode],[cTrade],[cCusAddress],[cCusPostCode],[cCusRegCode],
    [cCusBank],[cCusAccount],[dCusDevDate],[cCusLPerson],[cCusEmail],[cCusPerson],[cCusPhone],[cCusFax],[cCusBP],
    [cCusHand],[cCusPPerson],[iCusDisRate],[cCusCreGrade],[iCusCreLine],[iCusCreDate],[cCusPayCond],[cCusOAddress],
    [cCusOType],[cCusHeadCode],[cCusWhCode],[cCusDepart],[iARMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],
    [dEndDate],[iFrequency],[cCusDefine1],[cCusDefine2],[cCusDefine3],[iCostGrade]
    FROM [ufdata_006_2013].[dbo].[Customer]
    go
    --供应商分类
    insert into [ufdata_001_2013].[dbo].[vendorclass](
    cVCCode,cVCName,iVCGrade,bVCEnd)
    select cVCCode,cVCName,iVCGrade,bVCEnd
    from [ufdata_006_2013].[dbo].[vendorclass]
    go
    --供应商分类
    --供应商档案
    INSERT INTO [UFDATA_001_2013].[dbo].[Vendor](
    [cVenCode],[cVenName],[cVenAbbName],[cVCCode],[cDCCode],[cTrade],[cVenAddress],[cVenPostCode],[cVenRegCode],[cVenBank],
    [cVenAccount],[dVenDevDate],[cVenLPerson],[cVenPhone],[cVenFax],[cVenEmail],[cVenPerson],[cVenBP],[cVenHand],[cVenPPerson],
    [iVenDisRate],[iVenCreGrade],[iVenCreLine],[iVenCreDate],[cVenPayCond],[cVenIAddress],[cVenIType],[cVenHeadCode],[cVenWhCode],
    [cVenDepart],[iAPMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],[dEndDate],[iFrequency],[bVenTax],[cVenDefine1],
    [cVenDefine2],[cVenDefine3])
    SELECT
    [cVenCode],[cVenName],[cVenAbbName],[cVCCode],[cDCCode],[cTrade],[cVenAddress],[cVenPostCode],[cVenRegCode],[cVenBank],
    [cVenAccount],[dVenDevDate],[cVenLPerson],[cVenPhone],[cVenFax],[cVenEmail],[cVenPerson],[cVenBP],[cVenHand],[cVenPPerson],
    [iVenDisRate],[iVenCreGrade],[iVenCreLine],[iVenCreDate],[cVenPayCond],[cVenIAddress],[cVenIType],[cVenHeadCode],[cVenWhCode],
    [cVenDepart],[iAPMoney],[dLastDate],[iLastMoney],[dLRDate],[iLRMoney],[dEndDate],[iFrequency],[bVenTax],[cVenDefine1],
    [cVenDefine2],[cVenDefine3]
    FROM [ufdata_006_2013].[dbo].[Vendor]
    go
    --供应商档案
    --部门档案
    INSERT INTO [UFDATA_001_2013].[dbo].[Department]
    ([cDepCode], [bDepEnd], [cDepName], [iDepGrade], [cDepPerson], [cDepProp], [cDepPhone], [cDepAddress],
    [cDepMemo])
    SELECT
    [cDepCode], [bDepEnd], [cDepName], [iDepGrade], [cDepPerson], [cDepProp], [cDepPhone], [cDepAddress],
    [cDepMemo]
    FROM [ufdata_006_2013].[dbo].[Department]
    go
    INSERT INTO [UFDATA_001_2013].[dbo].[fa_Departments]
    (sNum,sName,sParentNum,sNum1,bSumDepr,iLevel,iDefinetype)
    select  cdepcode,cdepname,'',cdepcode,1,1,1
    from [UFDATA_001_2013].[dbo].[department]
    go
    --部门档案
    --职员档案
    INSERT INTO [UFDATA_001_2013].[dbo].[Person](
    [cPersonCode], [cPersonName], [cDepCode], [cPersonProp])
    SELECT
    [cPersonCode], [cPersonName], [cDepCode], [cPersonProp]
    FROM [ufdata_006_2013].[dbo].[Person]
    go
    --职员档案

    --项目大类
    insert into [UFDATA_001_2013].[dbo].[fitem](citem_class,citem_name,citem_text,crule,ctable,cclasstable)
    select citem_class,citem_name,citem_text,crule,ctable,cclasstable
    from [ufdata_006_2013].[dbo].[fitem]
    go
    --项目大类
    --项目分类
    insert into [UFDATA_001_2013].[dbo].[fitemss97class](
    cItemCcode,cItemCname,iItemCgrade,bItemCend)
    select cItemCcode,cItemCname,iItemCgrade,bItemCend
    from [ufdata_006_2013].[dbo].[fitemss97class]
    go
    --项目分类
    --项目档案
    insert into [UFDATA_001_2013].[dbo].[fitemss97](
    citemcode,citemname,bclose,citemccode,iotherused,dEndDate)
    select citemcode,citemname,bclose,citemccode,iotherused,dEndDate
    from [ufdata_006_2013].[dbo].[fitemss97]
    go
    --项目档案

    --凭证
    INSERT INTO [UFDATA_001_2013].[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 [ufdata_006_2013].[dbo].[GL_accvouch]
    /*where  iyear=2015  年度库时使用 */
    go
    --凭证
    --凭证1
    INSERT INTO [UFDATA_001_2013].[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 [ufdata_006_2013].[dbo].[GL_accsum]
    /*where  iyear=2015  年度库时使用 */
    go
    --凭证1
    --凭证2
    INSERT INTO [UFDATA_001_2013].[dbo].[GL_accass](
    [ccode], [cexch_name], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_class], [citem_id], [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], [cdept_id], [cperson_id], [ccus_id], [csup_id], [citem_class], [citem_id], [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 [ufdata_006_2013].[dbo].[GL_accass]
    /*where  iyear=2015  年度库时使用 */
    go
    --凭证2
    ---更新结帐标记为记帐
    UPDATE [UFDATA_001_2013].dbo.GL_mend  SET bflag='True'
    go
    ---更新结帐标记为记帐
    --现金流量
    delete from [UFDATA_001_2013].[dbo].[GL_CashTable]
    go
    INSERT INTO [UFDATA_001_2013].[dbo].[GL_CashTable](
    [iPeriod], [iSignSeq], [iNo_id], [inid], [cCashItem], [md], [mc])
    select a.iperiod,a.isignseq,a.ino_id,a.inid,b.cCashItem,b.md,b.mc
    from  [ufdata_006_2013].[dbo].[GL_accvouch] a,[ufdata_006_2013].[dbo].[GL_CashTable] b
    where a.iperiod=b.iperiod and a.isignseq=b.isignseq and a.iNo_id=b.iNo_id and a.inid=b.inid
    go
    --现金流量

     

     

    上一篇:T3一个月内多次发放工资

    客服电话:400-665-0028

    关键字:用友财务软件,畅捷通软件,财务软件,进销存软件,U9官网,用友U8,用友T1,用友T+,用友T3,用友T6,畅捷通好会计,好生意,智+好业财,用友培训服务售后公司,畅捷通运营培训服务公司

    版权所有:用友畅捷通软件 Copyright © 2025 All rights reserved.

    鲁ICP备2020041017号-6