应用场景:客户想将原来的账套数据清空,重新更改账套的启用年度和月份 
	注  意:会计期间的删除只保留当前启用年度的期间; 
	 另外执行完语句,模块的启用到软件中重新启用。 
	
	declare @UFTSystemName nvarchar(100)='UFTSystemDec'    --注意系统数据库名称,如果是旧版本T+,没有Dec 
	declare @UFTdataName nvarchar(100)='UFTData787759_000999'   --输入要更改的账套数据库名称 
	declare @cAcc_Num int=999    --输入要更改的账套号,注意前面没有0,如:000001账套,就输入1 
	declare @iYear int=2021    --输入要重新启用的会计年度 
	declare @iMonth int=2    --输入要重新启用的会计期间
	  
	--更改系统数据库账套表中的启用年度和启用期间 
	EXEC('update '+ @UFTSystemName+'..EAP_Account set iYear='+@iYear+',iDuration='+@iMonth+' where cAcc_Num='+@cAcc_Num) 
	--更改账套数据库里的启用年度 
	EXEC('update '+ @UFTdataName+'..EAP_AccInformation set Value='+@iYear+'  where (InfoID=''500'' and name=''EnableYear'' and Caption=''启用年度'')') 
	--更改账套数据库里的启用期间 
	EXEC('update '+@UFTdataName+'..EAP_AccInformation set Value='+@iMonth+'  where (InfoID=''501'' and name=''EnablePeriod'' and Caption=''启用期间'')') 
	--删除账套库里启用年度之前年度无用的会计期间记录 
	EXEC('delete from '+@UFTdataName+'..SM_Period where currentyear<'+@iYear) 
	--更改会计期间表字段 
	EXEC('update '+ @UFTdataName+'..SM_Period set  BizTerminalState=1,FiTerminalState=1  where currentyear='+@iYear+' and currentperiod<'+@iMonth) 
	EXEC('update '+ @UFTdataName+'..SM_Period set  BizTerminalState=0,FiTerminalState=0 where currentyear='+@iYear +' and currentperiod>='+@iMonth) 
	--修正账套库里模块启用对应的会计期间ID 
	EXEC('update '+ @UFTdataName+'..EAP_AccInformation set idEnablePeriod=(select id from '+@UFTdataName+'..SM_Period where currentyear='+@iYear+' and currentperiod='+@iMonth+') where OptionType=1 and idEnablePeriod>0')