DECLARE @nvSQLString NVARCHAR(4000)
SET @nvSQLString = 'SELECT * FROM tbTable01 WITH (NOLOCK)';
SET @nvSQLString = @nvSQLString + ' WHERE col > 1')';
EXECUTE sp_executesql @nvSQLString
DECLARE @nvSQLString NVARCHAR(4000)
SET @nvSQLString = 'SELECT * FROM tbTable01 WITH (NOLOCK)';
SET @nvSQLString = @nvSQLString + ' WHERE col > 1')';
EXECUTE sp_executesql @nvSQLString
Comments