AnsweredAssumed Answered

Join the Parent/Child table in DB Profile

Question asked by milowski@ohsu.edu on Sep 19, 2018
Latest reply on Sep 20, 2018 by milowski@ohsu.edu

Is it possible to created Parent-Child SELECT statement inside DB Profile?

I have INVOICES and INVOICE_LINES tables. They are related by INVOICE_ID. I created the SELECT statement for INVOICES and added "child statement" for INVOICE_LINES. Can I do it? How can I define the "linking element". It seems I cannot use the "Link Parameter" since it expects the OUT parameter.

 

At the end I need to map the DB record into an XML with following structure:

<INVOICES>

  <INVOICE>

    <ABC>zzzz</ABC>

    <LINE>

      <XYZ>qqqq</XYZ>

    </LINE>

    <LINE>

      <XYZ>www</XYZ>

    </LINE>

  <INVOICE>

<INVOICES>

 

I know I can cache INVOICE_LINES and use it in a map while reading INVOICES but I would like to know if this is possible within Database profile.

Outcomes