We have a store procedure that list the columns of a table. However, in some table names it worked while other don’t; return blank.
In the store procedure we have a declared variable @Var1 char(100) and placed it where the table name should be if used in constant value.
Tried placing in the coded were we need the table name:
QUOTENAME( @Var1 )
char(39) + @Var1 + char(39)
Please advice on the proper way to pass a table name and it can be used in a stored procedure script.