I do data cleanup using the query window in SQL. Probably pretty typical. Using UPDATE commands and such. A couple of times I've made mistakes and thus I would like to have a way of undoing a data change. I tried adapting the first code sample from
http://msdn2.microsoft.com/en-us/library/ms190295.aspxBy breaking it up so that I execute each part seperatly below. Which I hoped would work.
BEGIN TRANSACTION < then clicking the execute button >
UPDATE SET id = 14 WHERE ID = 27 < then clicking the excute button >
* then reviewing my changes
COMMIT TRANSACTION < then clicking the execute button >
Not suprizingly I get the message "The COMMIT TRANSACTION request has no corresponding BEGIN TRANSACTION
Is there a way to wrap commands in a transaction (or with another method) so that I can interactively verify my change before committing it?