I am wondering if someone could help me with the following INSERT statement.
declare @sqltxt as varchar(200)
select @sqltxt = 'INSERT INTO'+ @lookup_table+'('+[Description]+','+
declare @sqltxt as varchar(200)
select @sqltxt = 'INSERT INTO'+ @lookup_table+'('+[Description]+','+
Code:
+')values('+@description+','+@code+')'
print @sqltxtExec sp_executesql @sqltxt
Am I right in the fact that all non dynamic bits need to be in ''.
Thanks in advance