title: Return stored procedure result in function
body: <p>I have a complex stored procedure whose results I need to retrieve in a view somehow.  The end user is requesting the results to be linked in an Excel spreadsheet and I can only link views and tables in Excel.</p>
  
  <p>I know you can fudge your way through this somehow using <code>openquery</code> but it seems like that is not a desirable way of going about this and even when I tested this, I got errors in return.</p>
  
  <p>I can always dump the results into a table that's occasionally refreshed but the user is pretty intent on having this data live on demand.</p>
  
  <p>The other way seems to be through a function.  I tried this but no matter how I slice it I can't seem to get the function to accept a stored procedure.</p>
  
  <pre><code>CREATE FUNCTION f_testFunction
  (
      @Parameter INT
  )
  RETURNS TABLE
  AS
  RETURN
  (
      EXEC sp_testProdedure @Parameter
  )
  
  GO
  </code></pre>
  
  <p>Is something like the above even possible?</p>