Click to See Complete Forum and Search --> : is it possible to have a USP that accepts a parameter for use in the TOP function?


charley
11-14-2000, 02:34 PM
What I am trying to do is pass a parameter into a stored procedure so that
i can retrieve that X number of records off the top...

Something like:
CREATE PROCEDURE testProc
(
@testnum int
)
AS
SELECT TOP @testnum testID
FROM tblTest
ORDER BY testID
GO


Any ideas?

Please email me at: bogz@bogz.net

thanks for the help...