below is a part of a stored procedure I am trying to get to work but it won't accept the @NumberRecs in the select statement. Any reason??
CREATE PROCEDURE sp_Top5ReadWriters
(
@NumberRecs int
)
AS
SELECT TOP @NumberRecs contributor,hits
FROM #UserList
WHERE contributor != 5
Order by hits DESC
CREATE PROCEDURE sp_Top5ReadWriters
(
@NumberRecs int
)
AS
SELECT TOP @NumberRecs contributor,hits
FROM #UserList
WHERE contributor != 5
Order by hits DESC