I have a temporary table that I want to perform some data manipulation on, and then write back to the originating table. However, as a first step I would like to compare the original data side by side with the altered data.
Given the query below, how can I write to the modified data to the a new column in the temporary table so that I can compare side by side? I'm using SQL Server 2008.
UPDATE #TempCustomControls
SET ConfigValue =
CASE
WHEN ConfigValue like '%GetPersonProperty%$PersonID$%'
THEN 'PersonLogic.GetPersonProperty($PersonID$, ' + RIGHT(ConfigValue, charindex(',', REVERSE(ConfigValue))-1) + ')'
WHEN ConfigValue like '%GetProfileProperty%$PersonID$%'
THEN 'PersonLogic.GetPersonProperty($PersonID$, ' + RIGHT(ConfigValue, charindex(',', REVERSE(ConfigValue))-1) + ')'
WHEN ConfigValue like '%GetProfileProperty%GetJobCreatedByPerson%$JobID$%'
THEN 'PersonLogic.GetPersonPropertyFromJobID($JobId$, ' + RIGHT(ConfigValue, charindex(',', REVERSE(ConfigValue))-1) + ')'
ELSE
ConfigValue
END