title: Retrieve column definition for stored procedure result set that uses temp table
body: <p>I am trying to retrieve column definitions for a stored procedure using the following query:</p>
  
  <pre><code>exec sp_describe_first_result_set @tsql = N'EXEC    @return_value = [dbo].[foo]
      @DATABASENAME = dbname,
      @TABLENAME = tblname,
      @DATEFROM = N''20170101'',
      @DATETO = N''20170201'''
  </code></pre>
  
  <p>And I get the following response:</p>
  
  <blockquote>
    <p>Msg 11526, Level 16, State 1, Procedure sp_describe_first_result_set, Line 1<br>
    The metadata could not be determined because statement 'INSERT INTO #Tables(CubeSchema,TableName,DateFilterColumn,SelectColumns) SELECT 'Col1','Col2' in procedure 'foo' uses a temp table</p>
  </blockquote>
  
  <p>Is there a workaround for this issue?</p>
  
  <p>Edit: I have not the rights to view and/or alter the stored procedures, so unfortunately solutions of this sort won't work.</p>