I want to create a temporary table from calling a stored procedure as something like below
Select *
into #temp1
from
exec sp1;
or
select *
into #temp1
from sys.dm_exec_describe_first_result_set_for_object(object_id('dbo.sp1'), 1)
to get 2nd result set
I know later option is used to get first resultset only. But I want to get nth result set and create a temp table from it directly without defining temporary table.
My ultimate goal is to compare columns data type of a 2nd resultset from an SP with my expected table schema using tSQLt test case. So defining both actual table and expected table has no meaning. It will pass every time.