Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Jawad
Starting Member
17 Posts |
Posted - 2011-11-14 : 07:40:56
|
Hi SQLServer version 2005/2008One of my store procedure call multiple store procedures as follows:beginexec StoreProcedure1exec StoreProcedure2exec StoreProcedure3endand every called store procedure return a single record in a separate record set, so I got multiple resultant record sets of single values I want to combine and display all these values in single record set.Please guide me how can I combine all of my single value record sets in one record set.Wishes J a w a d |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-14 : 07:42:49
|
are all those recordsets having same fields? then you can create a temporary table with structure same as recordset and then do like...insert #tempexec StoreProcedure1insert #tempexec StoreProcedure2insert #tempexec StoreProcedure3.... ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
Jawad
Starting Member
17 Posts |
Posted - 2011-11-15 : 10:51:05
|
Thanks visakh16Its simple and great solution, will it also work with @Table variable as well?WishesJ a w a dquote: Originally posted by visakh16 are all those recordsets having same fields? then you can create a temporary table with structure same as recordset and then do like...insert #tempexec StoreProcedure1insert #tempexec StoreProcedure2insert #tempexec StoreProcedure3.... ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
|
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-11-15 : 11:01:47
|
it will from sql 2005 onwards------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|