December 19, 2012 at 10:46 pm
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
December 19, 2012 at 11:10 pm
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.
December 20, 2012 at 8:33 am
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 Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply