if you want column value you need to use dynamic sql for that. get name of column in a variable and append it to query as a string. then use EXEC or sp_executesql to execute it
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
if you want column value you need to use dynamic sql for that. get name of column in a variable and append it to query as a string. then use EXEC or sp_executesql to execute it
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
how is data present in unsaccountb table. does it have column storing name and another column storing value?
------------------------------------------------------------------------------------------------------ SQL Server MVP http://visakhm.blogspot.com/
This is the problem area..As seen below, the query outputs the unsaccountB tbl column name instead of the unsaccountB tbl column value. "CanonicalName " is one of the column name in unsaccountB tbl not the value... dw.[OldValue] | newVal= FINSOFT/FINSOFT/Özlem Karaman | CanonicalName