Note that there are some explanatory texts on larger screens.

plurals
  1. POCombining XML with Reverse Paths
    primarykey
    data
    text
    <p>I am looking for a way that I can query a database with multiple SQL Queries and then, once I have the results of the queries (in XML), merge the separate XML together into one XML document, using reverse paths. My reason for doing this is related to the concept of Parallel Details (same data, with different manipulations applied).</p> <p>For example, 3 Queries:</p> <pre><code> SELECT * FROM Customer; SELECT * FROM Purchase_order; SELECT * FROM Line_Item; </code></pre> <p>Query 1 Results:</p> <pre><code> &lt;customer&gt; &lt;cust_id&gt;2&lt;/cust_id&gt; &lt;fname&gt;John&lt;/fname&gt; &lt;lname&gt;Doe&lt;/lname&gt; &lt;/customer&gt; </code></pre> <p>Query 2 Results:</p> <pre><code> &lt;purchase_order&gt; &lt;order_id&gt;2&lt;/order_id&gt; &lt;cust_id&gt;2&lt;/cust_id&gt; &lt;shipped&gt;7/7/2009&lt;/shipped&gt; &lt;/purchase_order&gt; </code></pre> <p>Query 3 Results:</p> <pre><code> &lt;line_item&gt; &lt;line_id&gt;2&lt;/line_id&gt; &lt;order_id&gt;2&lt;/order_id&gt; &lt;quantity&gt;7&lt;/quantity&gt; &lt;/line_item&gt; </code></pre> <p>Desired Output:</p> <pre><code> &lt;collection&gt; &lt;customer&gt; &lt;cust_id&gt;2&lt;/cust_id&gt; &lt;fname&gt;John&lt;/fname&gt; &lt;lname&gt;Doe&lt;/lname&gt; &lt;/customer&gt; &lt;purchase_order&gt; &lt;order_id&gt;2&lt;/order_id&gt; &lt;cust_id&gt;2&lt;/cust_id&gt; &lt;shipped&gt;7/7/2009&lt;/shipped&gt; &lt;/purchase_order&gt; &lt;line_item&gt; &lt;line_id&gt;2&lt;/line_id&gt; &lt;order_id&gt;2&lt;/order_id&gt; &lt;quantity&gt;7&lt;/quantity&gt; &lt;/line_item&gt; &lt;/collection&gt; </code></pre> <p>This looks like it would be easy, but my SQL queries can return a lot of customers, and a lot of purchase orders and line items, and I need to be able to match them all up.</p> <p>I cannot use one SQL Query with Joins that will collect all of this information at once.</p> <p>Has anyone ever seen anything like this done? Any ideas?</p> <p>Thanks.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload