This discussion is archived
3 Replies Latest reply: Jun 4, 2013 5:06 AM by 1012667 RSS

Link between queries

1012667 Newbie
Currently Being Moderated
I have 2 cursor queries:
<dataQuery>
     <sqlStatement name="Q_1"><![CDATA[
          select XX_PACKAGE_PKG.Header_Data (:p_invoice_num_from, :p_invoice_num_to, :p_invoice_date_from, :p_invoice_date_to, :p_customer_name) from dual
          ]]>
</sqlStatement>
     <sqlStatement name="Q_2"><![CDATA[
          select XX_PACKAGE_PKG.Lines_Data(:CUSTOMER_TRX_ID) from dual
          ]]>
</sqlStatement>
</dataQuery>

First statement returning customer_trx_id which is parameter in second statement.
In data output I have always the same lines for every invoice.
To function XX_PACKAGE_PKG.Lines_Data always is setting customer_trx_id from first printing invoice.
I don't now why this run in this way.

Thanks for any help.
MS

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points