从数据库反结账语句

栏目:k3wise知识作者:金蝶来源:金蝶云社区发布:2024-09-16浏览:1

从数据库反结账语句

declare @y int,@p int

set @y=2015

set @p=3

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'


从数据库反结账语句

declare @y int,@p intset @y=2015set @p=3Delete from t_Balance Where FYear = @y And FPeriod = @pDelete from t_Qua...
点击下载文档
分享:
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息