TH_Process_95CopyTo97

2019-06-19 0 条评论 50 次阅读 0 人点赞

CREATE PROCEDURE [dbo].[TH_Process_95CopyTo97]
@ProcessID varchar(200)--ProcessID
AS
BEGIN
SET NOCOUNT ON;
delete from dbo.[WF_ActivityAssignRule] where ActivityID in(select activityid from dbo.[WF_Activity] where ProcessID = @ProcessID);
delete from dbo.[WF_ActivityRoutingRule] where ProcessID = @ProcessID;
delete from dbo.[WF_Activity] where ProcessID = @ProcessID;
delete from dbo.[WF_Process] where ProcessID = @ProcessID;

insert into dbo.[WF_ActivityAssignRule] select* from LINK95_XXPT.SEPCO_XXPT.DBO.WF_ActivityAssignRule where ActivityID in(select activityid from WF_Activity Where ProcessID = @ProcessID);
insert into dbo.[WF_ActivityRoutingRule] select * from LINK95_XXPT.SEPCO_XXPT.DBO.WF_ActivityRoutingRule where ProcessID = @ProcessID;
insert into dbo.[WF_Activity] select * from LINK95_XXPT.SEPCO_XXPT.DBO.WF_Activity where ProcessID = @ProcessID;
insert into dbo.[WF_Process] select * from LINK95_XXPT.SEPCO_XXPT.DBO.WF_Process where ProcessID = @ProcessID;

SET NOCOUNT OFF;
select '更新完成'

END
GO

root

这个人太懒什么东西都没留下

文章评论(0)