--Build Delete
Statements
SELECT 'EXEC mdm.udpSubscriptionViewDeleteByID @ID=' + CONVERT(VARCHAR(10), ID) + ' ,@DeleteView=1' FROM
mdm.tblSubscriptionView WHERE IsDirty
= 1
--Build Create
Statements
SELECT 'EXEC mdm.udpSubscriptionViewSave
@SubscriptionView_ID=NULL,@Entity_ID='
+ CONVERT(VARCHAR(10), Entity_ID) + ',@Model_ID=' + CONVERT(VARCHAR(10), Model_ID) + ',@DerivedHierarchy_ID=NULL,@ModelVersion_ID=' + CONVERT(VARCHAR(10), ModelVersion_ID) + ',@ModelVersionFlag_ID=NULL,@ViewFormat_ID=' + CONVERT(VARCHAR(10), ViewFormat_ID) + ',@Levels=NULL,@SubscriptionViewName=N'''
+ Name + '''' FROM mdm.tblSubscriptionView
WHERE IsDirty =
1
No comments:
Post a Comment