procedure [dbo].[GetResults] @pIndex varchar(50), @startRowIndex int, @maximumRows int AS DECLARE @TempItems TABLE ( ID int IDENTITY, GMKey int, Details nChar(800) ) DECLARE @maxRow int SET CONCAT_NULL_YIELDS_NULL OFF SET ANSI_WARNINGS OFF SET @maxRow = (@startRowIndex + @maximumRows) - 1 SET ROWCOUNT @maxRow INSERT INTO @TempItems (GMKey,TABLENAME,Details) Select PRIMARYINDEX as GMKey, LTRIM(RTRIM(cast(Facility_Name as nChar(800)))) as Details from SEARCHINFO where Facility_Name LIKE @pIndex + '%' order by PRIMARYINDEX DESC SET ROWCOUNT @maximumRows SELECT GMKey, TABLENAME, Details FROM @TempItems WHERE ID >= @startRowIndex RETURN
Stored Procedure
SCOPE_IDENTITY()
Google
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)