You can
- create a table variable to hold the
result set from the stored proc and
then - insert the output of the
stored proc into the table variable,
and then - use the table variable
exactly as you would any other
table…
… sql ….
Declare @T Table ([column definitions here])
Insert @T Exec storedProcname params
Select * from @T Where ...