Say I have a stored procedure that returns rows:
CREATE PROCEDURE MyProc
AS
BEGIN
SELECT * FROM MyTable
END
Of course my actual procedure is a little more complicated, being why a sproc is necessary.
Is it possible to select the output from calling this procedure?
Something like:
SELECT * FROM (EXEC MyProc) AS TEMP
The reason, is I need to use SELECT TOP X, ROW_NUMBER, and an additional WHERE clause to page my data, and I don't really want to pass these values as parameters.