Note that there are some explanatory texts on larger screens.

plurals
  1. POCall a stored procedure, into another stored procedure
    primarykey
    data
    text
    <p>I have a procedure, that insert a line into one of my table.</p> <p>After the INSERT in the procedure, I want to find all the lines into another table, and then, call the insert procedure of the second table.</p> <p>So I have all the first procedure that works fine </p> <pre><code>P_INSERT_TABLE1 INSERT INTO TABLE1 ... COMMIT; FOR record_po IN (SELECT C3, ... FROM T_TABLE2 WHERE id = v_id) LOOP P_INSERT_TABLE2(record_po.C3, ...); END LOOP; </code></pre> <p>All "in parameters" for P_INSERT_TABLE2 are VARCHAR2, so I make a "to_char" for each column are not varchar2 :</p> <pre><code>P_INSERT_TABLE2(pi_id, record_po.C3, record_po.C4, record_po.C5, record_po.C6, record_po.C7, to_char(record_po.C8, 'DD/MM/YYYY'); </code></pre> <p>Here, pi_id, is one of the in parameters of P_INSERT_TABLE1, in VARCHAR2.</p> <p>So now, I have this error message : </p> <pre><code>Erreur(357,1): PLS-00306: number or args types wrong in the call of P_INSERT_TABLE2 </code></pre> <p>I don't understand, why P_INSERT_TABLE2 don't accept parameters, while there are all the good types in the good order?</p> <p>If I call the procedure like "<code>call P_INSERT_TABLE2(...)</code>" I have an error like :</p> <pre><code>Erreur(357,9): PLS-00103: Symbol "P_INSERT_TABLE2" instead one of this symbols : := . ( @ % ; immediate Symbole ":=" create or replace PROCEDURE P_INSERT_TABLE2 ( pi_id IN VARCHAR2 ,pi_C3 IN VARCHAR2 ,pi_C4 IN VARCHAR2 ,pi_C5 IN VARCHAR2 ,pi_C6 IN VARCHAR2 ,pi_C7 IN VARCHAR2 ,pi_C8 IN VARCHAR2 ,pmessage OUT NOCOPY VARCHAR2 ) </code></pre> <p>Thanks for helping.</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