• If your stored proc doesn't lend itself to being re-written as a function, you can always look at using a self-referenced linked server set up. Meaning - set up the DB instance as a linked server to itself, so that you can use OPENQUERY (which would allow you to use the recordset from a stored proc in the same places as a table).

    As in - the following would work (assuming the stored proc has a SELECT statement outputtting data)

    select * from OPENQUERY(mySelfLink, 'Exec myDb.dbo.MyStoredProc @sqlParams') q

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?