stored procedure and "with result sets"

is there a way to get the results of the 'results set' below in  a table? or can we kick the stored procedure below twice for different parameters and get the combined result set in a table?

exec dbo.proc_test 'test parameter'
with result sets
(  
	(   
		c1 int,
		c2  nvarchar(100)  
	)
);

September 8th, 2015 12:00am

declare @Result (c1 int, c2 nvarchar(100))

insert into @Result 

exec dbo.proc_test 'test parameter'

...

Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 12:13am

sorry for not disclosing all the details, i have been struggling for the last 3 days to figure this issue out. the stored procedure i have kicks off another stored procedure and so i can't use the code above. i am trying to explore what other options i have but keep hitting a hard wall.

https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f6c85a8e-4d1b-42b4-98d8-9f894336d718/openrowset-error?forum=transactsql

September 8th, 2015 12:26am

Yes, I read that thread after I answered. I am not sure if any other option exists.
Free Windows Admin Tool Kit Click here and download it now
September 8th, 2015 12:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics