Quantcast
Channel: Answers for "variable replacement using sp_executesql"
Viewing all articles
Browse latest Browse all 8

Answer by Grant Fritchey

$
0
0
You can't pass a table name as a variable in that fashion. You'll still have to build the string and replace the variable with the table name such that when the query executes, it has a table to reference. Otherwise, it will just fail.

Viewing all articles
Browse latest Browse all 8

Trending Articles