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 |
|
isaacbs
Starting Member
10 Posts |
Posted - 2003-07-02 : 13:34:50
|
| I generate half of an XML document with one stored procedure and the other half with another stored procedureHow can I merge the result of both stored procedures in one XML document, something like this<root> <firstSPResult> <moreNodes/> </firstSPResult> <secondSPResult> <otherNodes/> </secondSPResult></root> |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-02 : 13:36:32
|
| Why are you doing this in two stored procedures? Why don't you just do it in one stored procedure and use UNION if the results are from different tables?Tara |
 |
|
|
isaacbs
Starting Member
10 Posts |
Posted - 2003-07-02 : 13:53:35
|
| Well I thought about the UNION operator but the first SP generates only one node that is unique in the document and comes from tables with different data types and number of columns than the ones that queries the second SP, which generates many nodes, completely different from the one that generates the first SPbut I'm not sure if there is a way to combine both results in SQL2KThnx in advance Isaac |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-07-02 : 13:58:36
|
| If the nodes are so different, then why would you want to combine them?Tara |
 |
|
|
isaacbs
Starting Member
10 Posts |
Posted - 2003-07-02 : 14:13:44
|
| The XML document represents a purchase orderThe first SP generates information that is only placed once in the purchase order, something like a header that contains the provider information for exampleThe second stored procedure generates the nodes that contain information about the items for that orderat the end the combination of both will make the complete purchase order |
 |
|
|
|
|
|