June 22, 2010 at 12:55 pm
Just curious: is it possible to perform a UNION between two stored procedure executions (that both return identical data formats)?
+--------------------------------------------------------------------------------------+
Check out my blog at https://pianorayk.wordpress.com/
June 22, 2010 at 1:07 pm
Not exactly union, but you can insert the results of a proc into a table. Insert both result sets into a temp table, then query that.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
June 22, 2010 at 1:18 pm
GilaMonster (6/22/2010)
Not exactly union, but you can insert the results of a proc into a table. Insert both result sets into a temp table, then query that.
I'm with you. I'm playing around with a web item that pulls data from a SP. However, I came across a scenario where this app needs to call the SP twice (using two different parameters). It's a very minor thing -- to the point that it's not worth rewriting the SP or spending any major effort on it. I was just checking to see if there was a quick 'n easy workaround. Not a big deal.
Thanks for your help as always, Gail!
+--------------------------------------------------------------------------------------+
Check out my blog at https://pianorayk.wordpress.com/
October 17, 2012 at 10:36 am
Hi try this link for detail..http://codingresolved.com/discussion/73/how-to-union-two-stored-procedures-results-in-mssql-2005#Item_2
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply