Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

combine stored procedures result Expand / Collapse
Author
Message
Posted Wednesday, December 19, 2012 10:46 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, March 5, 2014 10:24 PM
Points: 48, Visits: 370


Hi all


I have two stored procedures which return dynamic columns as result sets.
is there any way to combine both resultsets???????


after searching for solution i got to know that it is possible when stored procedure returns static columns by using table variable...but what about dynamic columns???????

Thanks
----------
$w@t
Post #1398777
Posted Wednesday, December 19, 2012 11:10 PM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 7:13 AM
Points: 1,127, Visits: 1,594
If the columns are dynamic then on what persistent basis do you plan to JOIN the columns??.....or is it that it does not matter??......Just by looking at your explanation it is not possible to assess the predicates of the JOIN you intend to do....please explain the requirement a little more.

The explanation would be most effective if you can post and example scenario of what you are looking for with appropriate DDL, Sample Data and the Expected Result Set. Please have a look at the link in my signature to learn how to post DDL, Sample Data and the Expected Result Set.

If you post Sample Data and DDL then people who read your post would get the exact picture of what you are trying to do and they would use the data you provide to find a solution for you and you would get a response instantly.


Vinu Vijayan

For better and faster solutions please check..."How to post data/code on a forum to get the best help" - Jeff Moden
Post #1398785
Posted Thursday, December 20, 2012 8:33 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:34 PM
Points: 13,481, Visits: 12,342
Please don't cross post. Direct all replies here. http://www.sqlservercentral.com/Forums/Topic1398784-1292-1.aspx

_______________________________________________________________

Need help? Help us help you.

Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

Need to split a string? Try Jeff Moden's splitter.

Cross Tabs and Pivots, Part 1 – Converting Rows to Columns
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs
Understanding and Using APPLY (Part 1)
Understanding and Using APPLY (Part 2)
Post #1399009
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse