Can one pass a parameter to the TOP part of the select statement through a Stored Procedure, e.g.<br><br>CREATE PROC sp_TopSelect (@sp_param int)<br>AS<br>SELECT TOP @sp_param field1,field2,fieldn<br>FROM Table....<br>----<br><br>EXEC sp_TopSelect 5<br>---- <br><br>The above example doesn't work due to a syntax error. <br>There is a solution around this but it has to be implemented in VB or VBScript (Sort the Select statement and then do a 'FOR' loop on the Recordset and make the ubound of the FOR loop dynamic). <br>I was wondering if a solution can be implemented directly into the stored procedure with the input parameter for the top part. <br><br>luvASP.