I ended up creating a string of numbers surrounded by ';'. It looks like this
;123;;456;;789;
They are passed to the SPROC as NIDList
The SPROC looks like this
There are approximately 50,000 records in the table and if I retrieve 300 it takes a couple of seconds. Not great but acceptable.Code:@NIDList VARCHAR(MAX) AS BEGIN SET NOCOUNT ON; SELECT [NID] ,[P1] ,[P2] ,[RC] ,[Active] ,[Flags] ,[Hist] FROM [SectNum] WHERE @NIDList like '%;'+cast([NID] as VARCHAR(MAX))+';%';




Reply With Quote