In SQL Server, you must create and execute a dynamic SQL statement.
Declare @name char (17), @sql nvarchar(200)
Set @name = 'c.coverage_code_1'
Set @sql = 'select @name from #temptable c'
exec (@sql) Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.