I have the following line of SQL:-
set @sqltxt = 'INSERT INTO ' + @lookup_table + '([Description],
set @sqltxt = 'INSERT INTO ' + @lookup_table + '([Description],
Code:
,[Entered_By]) Values('''+@description+''','''+@code+''','''+@person+''')'
The probelm is that the descriptions may contain single quotes and cause the compiler to complain that I have not closed them. So the statement reads:-
NSERT INTO Lookup([Description],[Code],[Entered_By]) Values(''vaccination','99','person')
Is there anyway around this?
Thanks in advance
Sarah