For example:
drop table if exists #t
create table #t (Col1 int, Col2 varchar(max))
insert #t exec spA
insert #t exec spB
select * from #t
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have multiple stored procedures that I am running but I need to combine all results into one dataset. For example
exec sp A gives me 15 rows
exec sp B gives me 10 rows
I want to execute both and get 25 rows in my final output.
For example:
drop table if exists #t
create table #t (Col1 int, Col2 varchar(max))
insert #t exec spA
insert #t exec spB
select * from #t
Hi @Ali Ahad
By the way, if there is no parameter to specify when executing SP, you could generate the scripts to one single script dynamically.
Best regards,
Cosmog Hong