хранящаяся процедура, которая выбирается в таблице
Declare @T Table ([column definitions here])
Insert @T Exec storedProcname params
Select * from @T Where ...
Outstanding Octopus