I've to concatenate a sql query with a parameter. My t-sql code:
DECLARE @TESTPARAM varchar(20)
DECLARE @SQLQUERY varchar(250)
SET @TESTPARAM = 'test'
SET @SQLQUERY = 'SELECT ' + @TESTPARAM+ '
So I want to have the value in the select query and not the column.
Can you help me?
Thanks a lot.
Kind regards, pro