资讯

Run it, exec sp_executesql and all.<BR><BR>How is the query being generated though, out of curiosity? I wouldn't expect single quotes to be added in the IN clause.
EXECUTE sp_executesql @sql, @parms, @dbparm = @dbname While in real life you'd never use this complicated of a query to retrieve this information, it illustrates the syntax of the stored procedure ...
In this third in a series on working smarter with T-SQL, let's give the built-in sp_executesql stored proc a go. In my previous posts, I've described some methods for generating and executing T ...