Hi
I am trying to write a function in which I customize my select statement. But it is not working as i desire...
It is as
declare @column_name nvarchar(10)
set @column_name = 'original'
select @column_name from data
Here original is the name of one of the columns. I wanted to make it such that column_name can be assigned any of the column names and the same piece of code works only by changing the value of @column_name...but it is not working....
any ideas ??