Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2008
»
T-SQL (SS2K8)
»
UNION between two stored procedures?
UNION between two stored procedures?
Rate Topic
Display Mode
Topic Options
Author
Message
Ray K
Ray K
Posted Tuesday, June 22, 2010 12:55 PM
SSCrazy
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 6:25 PM
Points: 2,062,
Visits: 3,221
Just curious: is it possible to perform a UNION between two stored procedure executions (that both return identical data formats)?
Post #941301
GilaMonster
GilaMonster
Posted Tuesday, June 22, 2010 1:07 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 4:11 PM
Points: 37,741,
Visits: 30,020
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 2008, MVP
SQL In The Wild
: Discussions on DB performance with occasional diversions into recoverability
We walk in the dark places no others will enter
We stand on the bridge and no one may pass
Post #941308
Ray K
Ray K
Posted Tuesday, June 22, 2010 1:18 PM
SSCrazy
Group: General Forum Members
Last Login: Tuesday, March 19, 2013 6:25 PM
Points: 2,062,
Visits: 3,221
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!
Post #941316
totalkarachi
totalkarachi
Posted Wednesday, October 17, 2012 10:36 AM
Forum Newbie
Group: General Forum Members
Last Login: Thursday, October 18, 2012 3:01 PM
Points: 2,
Visits: 3
Hi try this link for detail..
http://codingresolved.com/discussion/73/how-to-union-two-stored-procedures-results-in-mssql-2005#Item_2
Post #1373940
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.