标签:专业版 set 金蝶 KIS where Update -- SQL Where
--SQL反结账语句,专业版测试成功--
declare @y int
declare @p int
set @y =2017 --修改为账套当前会计年度--
set @p =11 --修改为账套当前会计期间--
Delete from t_Balance Where FYear = @y And FPeriod = @p
Delete from t_QuantityBalance Where FYear = @y And FPeriod = @p
Delete from t_ProfitAndLoss Where FYear = @y And FPeriod = @p
Delete t_subsys where Fnumber = 'Gl' and Fyear = @y and Fperiod = @p
Update t_subsys set Fused = -1 , FPeriodSynch = -1 , FCheckout = 0 where Fsubsysid = 1 and Fyear= @y and Fperiod = @p-1
if exists (select * from sysobjects where id = object_id(N't_scAccumulation') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
Delete from t_scAccumulation Where FYear = @y And FPeriod = @p-1
Update t_SystemProfile Set FValue = @p-1 Where FCategory = 'GL' And FKey = 'CurrentPeriod'
Update t_SystemProfile Set FValue = @y Where FCategory = 'GL' And FKey = 'CurrentYear'
--修改允许负库存出库参数(0为不允许,1为允许,专业版)--
Update t_systemprofile set fvalue=0 where fcategory='IC' and fkey='UnderStock'
--修改允许负库存结账(0为不允许,1为允许,专业版)--
update t_systemprofile set fvalue = 0 where fcategory = 'IC' and fkey = 'UnderStockCalculate'
--清理用户配置信息,专业版--
delete from t_userprofile
--库存更新控制,Fvalue = 0 单据审核后更新,Fvalue = 1 单据保存后更新,专业版--
Update t_systemprofile set FValue=0 where FCategory='IC' and FKey='UPSTOCKWHENSAVE'
标签:专业版,set,金蝶,KIS,where,Update,--,SQL,Where 来源: https://www.cnblogs.com/hu10256/p/14198080.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。