Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can I assign a shared foreign key to all records inserted using the Data Load Wizard?
    primarykey
    data
    text
    <p>I have an ApEx application which, amongst other purposes, has a requirement to upload billing data provided by telecommunications providers. The data is being provided as a CSV file.</p> <p>We have two tables. The first table, <code>phone_invoice</code>, contains per-invoice metadata such as billing dates and provider name. The second table, <code>phone_invoice_detail</code> is based largely on call logs.</p> <p><code>phone_invoice_detail</code> has a foreign key, <code>invoice_id</code>, which keys into <code>phone_invoice(id)</code>. This creates a stock-standard master-detail relationship.</p> <p>We have used the ApEx Data Load Wizard to set up the import capability for our users. But I need to assign the <code>invoice_id</code> to each imported row.</p> <p>Currently, I have a Phone Invoice page. Users click a button, "Import Data for Invoice", which branches to the Data Load Wizard and sets a page item, <code>P1000_INVOICE_ID</code> with the value of that invoice ID -- <code>P999_ID</code>.</p> <p>When the user begins the process, the CSV data supplied has all the fields <em>except</em> for an invoice ID. What I want is for that column in the underlying table -- <code>invoice_id</code> -- to be set to to the value of <code>P1000_INVOICE_ID</code>.</p> <p>My current focus is on using the Transformation Rules. This has been tremendously frustrating because the documentation tells you nothing about them and there are no examples.</p> <p>Permutations I have tried:</p> <pre><code>-- PL/SQL Expression: :INVOICE_ID := :P1000_INVOICE_ID :INVOICE_ID := :P999_ID SELECT :P1000_INVOICE_ID INTO :INVOICE_ID FROM DUAL SELECT :P999_ID INTO :INVOICE_ID FROM DUAL -- Replace: -- Expression 1 Expression 2 :P1001_INVOICE_ID :INVOICE_ID :P999_INVOICE_ID :INVOICE_ID </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
    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