title: SQL Server: Output parameter to table
body: <p>I have the next T-SQL code:</p>
  
  <pre><code>DECLARE @A CHAR(1)
  DECLARE @B CHAR(10)
  DECLARE @C DECIMAL
  DECLARE @D CHAR(1)
  
  SET @A = 'S'
  SET @B = '2015-03-23'
  SET @C = 1
  SET @D = 'P'
  
  EXEC('CALL DATA_COLLECTOR(?,?,?,?)',@A, @B, @C, @D) at LINKED_SERVER_10
  
  PRINT @D
  </code></pre>
  
  <p>@D is an input-ouput variable.</p>
  
  <p>After running the code, the variable @D gets a result set (5 rows, 10 columns).</p>
  
  <p>How can I copy the result set contained in @D to another table in my database?.</p>
  
  <p>Thanks in advance.</p>