Forum Replies Created

Viewing post 1 (of 1 total)

  • RE: Find Affected Row Count from a Dynamic Query

    DECLARE @sqlBody VARCHAR(500),@TableCount INT, @SQL NVARCHAR(1000)
    SELECT @sqlBody = 'from sysobjects'SELECT @SQL = N'SELECT @TableCount = COUNT(*) ' + @sqlBody
    EXEC sp_executesql @SQL, N'@TableCount INT OUTPUT', @TableCount OUTPUTSELECT @TableCountGO

Viewing post 1 (of 1 total)