查看更新金蝶k3中启用年期年度和期间
select * from t_systemprofile where fcategory='GL' and ( fkey='StartYear' or fkey='StartPeriod' )
--------------------
select T1.金蝶k3_总账启用年度 ,T2.金蝶k3总账启用月份, ( convert(varchar(10),T1.金蝶k3_总账启用年度)+'.'+convert(varchar(10),T2.金蝶k3总账启用月份) ) as 金蝶k3_总账启用年月
from ( select FCategory as 类别代码,FValue as 金蝶k3_总账启用年度 from t_SystemProfile where fkey='StartYear' and fcategory='GL' ) as T1
left outer join ( select FCategory as 类别代码,FValue as 金蝶k3总账启用月份 from t_SystemProfile where fkey='StartPeriod' and fcategory='GL' ) as T2
on T1.类别代码=T2.类别代码
----------------------------------------------------
----------------------------------------
--查询总账所有参数
select FCategory as 类别代码, fkey as 参数 , FValue as 参数值 from t_SystemProfile where fcategory='GL'
----------------------------------------
--查询总账的启用年度和期间
select FCategory as 类别代码,FValue as 金蝶k3_总账启用年度 from t_SystemProfile where fkey='StartYear' and fcategory='GL'
select FCategory as 类别代码,FValue as 金蝶k3总账启用月份 from t_SystemProfile where fkey='StartPeriod' and fcategory='GL'
-----------------------------------------
--更新总账的启用年度
--原来2015更新为2014
-- 启用年度
update t_SystemProfile set FValue = 2014 where fkey='StartYear' and fcategory='GL'
--更新总账的启用期间
--原来1更新为5
-- 启用期间
update t_SystemProfile set FValue = 5 where fkey='StartPeriod' and fcategory='GL'
-----------------------------------------
--修改当前年份
--原来2015更新为2014
-- 当前年度(建议等于=启用年度)
update t_systemprofile set fvalue= 2014 where fkey='CurrentYear' and fcategory='GL'
--修改当前期间
--原来1更新为5
-- 当前期间(建议等于=启用期间)
update t_systemprofile set fvalue='5' where fkey='CurrentPeriod' and fcategory='GL'
-----------------------------------------
--注意:如果原来的期初中已经存在数值,则还要注意
--1.取消所有凭证的结账,记账,审核操作
--2.取消结束初始化操作
--查询期初数据
select * from t_Balance
--更新期初数据
-- 期初年度 期初期间
update t_Balance set FYear =2014 , FPeriod = 5 where FYear=2016 and FPeriod=1
-------------------------