CREATE PROCEDURE usp_GetFeature
@RecordCount int output
AS
DECLARE @SQL_COUNT NVARCHAR(1000)
--record count
SET @SQL_COUNT = N'SELECT @x = COUNT(*) FROM vw_Feature WHERE 1=1'EXEC sp_executesql @SQL_COUNT,N'@x int output',@RecordCount output
@RecordCount int output
AS
DECLARE @SQL_COUNT NVARCHAR(1000)
--record count
SET @SQL_COUNT = N'SELECT @x = COUNT(*) FROM vw_Feature WHERE 1=1'EXEC sp_executesql @SQL_COUNT,N'@x int output',@RecordCount output
@RecordCount int output
ASSELECT @RecordCount = COUNT(*) FROM vw_Feature