/*
-----------------------------------------------------------------
Live Change Data Edit Script Template - Results to Text (Ctrl+T)
-----------------------------------------------------------------
Author:
Date:
Code Reviewed By:
Test Environment:
Required Environment:
Description:
-----------------------------------------------------------------
For more SQL resources, check out SQLServer365.blogspot. co.uk
-----------------------------------------------------------------
You may alter this code for your own purposes.
You may republish altered code as long as you give due credit.
You must obtain prior permission before blogging this code.
THIS CODE AND INFORMATION ARE PROVIDED "AS IS"
-----------------------------------------------------------------
*/
-- Step 1
-- Set database context
USE ;
GO
-- Step 2
-- Run select statement(s) before data modifications for historical record
-- Step 3
-- Record results before data modifications
/*
*/
-- Step 4
-- Start of data modifications - Use BEGIN TRANSACTION to allow rollback if errors or unexpected results occur
PRINT '*** START DATA MODIFICATIONS ***'
BEGIN TRANSACTION
-- Step 5
-- End of data modifications
PRINT '*** END OF DATA MODIFICATIONS'
-- Step 6
-- COMMIT OR ROLLBACK? - FOR DBA USE WHEN BEING EXECUTED LEAVE COMMENTED OUT!
-- COMMIT TRANSACTION
-- ROLLBACK TRANSACTION
-- Step 7
-- Run select statement(s) after data modifications
-- Step 8
-- Record results after data modifications for historical record
/*
*/
Enjoy!
Chris
No comments:
Post a Comment