Pick Return Values of Stored Procedure
        Posted  
        
            by Juergen
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Juergen
        
        
        
        Published on 2010-04-01T14:14:12Z
        Indexed on 
            2010/04/01
            14:23 UTC
        
        
        Read the original article
        Hit count: 344
        
Hi,
I have a stored procedure that returns a result with 250!!! columns.
But I only need 3 out of the 250.
I want to call the SP and put only the 3 column values in a temp table. I don't want to define a temp table with 250 columns!
This is how I would like to do it, but this doesn't work of course:
create #myTempTable (id int, value1 int, value2 int)
insert into #myTempTable 
  exec myBigFatStoredProc
Can it be done anyhow?
Bye Juergen
© Stack Overflow or respective owner