Calling procedure with 2 parameters from a dynamic link

I have just another question-
I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
The following is my code....
SELECT re.report_exec_id, re.exec_userid,
NVL(re.batch_exec_date, re.begin_date) report_date,
re.rows_returned,
re.status, re.error,
f_file_url(re.filename) file_url,
re.comments,
''Archive''archive
FROM metadev.report_execution re, metadev.report r
WHERE re.report_id = r.report_id
AND r.spec_number = :v_spec
AND re.status <> 'DELETED'
AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
ORDER BY begin_date DESC
The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
IT GIVES AN ERROR....
Do you guys know where I am going wrong...

You missed the ampersand symbol in between the parameters.
This should be
''Archive''archive
instead of
''Archive''archive

Similar Messages

  • Calling a Stored Procedure with output parameters from Query Templates

    This is same problem which Shalaka Khandekar logged earlier. This new thread gives the complete description about our problem. Please go through this problem and suggest us a feasible solution.
    We encountered a problem while calling a stored procedure from MII Query Template as follows-
    1. Stored Procedure is defined in a package. Procedure takes the below inputs and outputs.
    a) Input1 - CLOB
    b) Input2 - CLOB
    c) Input3 - CLOB
    d) Output1 - CLOB
    e) Output2 - CLOB
    f) Output3 - Varchar2
    2. There are two ways to get the output back.
    a) Using a Stored Procedure by declaring necessary OUT parameters.
    b) Using a Function which returns a single value.
    3. Consider we are using method 2-a. To call a Stored Procedure with OUT parameters from the Query Template we need to declare variables of
    corresponding types and pass them to the Stored Procedure along with the necessary input parameters.
    4. This method is not a solution to get output because we cannot declare variables of some type(CLOB, Varchar2) in Query Template.
    5. Even though we are successful (step 4) in declaring the OUT variables in Query Template and passed it successfully to the procedure, but our procedure contains outputs which are of type CLOB. It means we are going to get data which is more than VARCHAR2 length which query template cannot return(Limit is 32767
    characters)
    6. So the method 2-a is ruled out.
    7. Now consider method 2-b. Function returns only one value, but we have 3 different OUT values. Assume that we have appended them using a separator. This value is going to be more than 32767 characters which is again a problem with the query template(refer to point 5). So option 2-b is also ruled out.
    Apart from above mentioned methods there is a work around. It is to create a temporary table in the database with above 3 OUT parameters along with a session specific column. We insert the output which we got from the procedure to the temporary table and use it further. As soon the usage of the data is completed we delete the current session specific data. So indirectly we call the table as a Session Table. This solution increases unnecessary load on the database.
    Thanks in Advance.
    Rajesh

    Rajesh,
    please check if this following proposal could serve you.
    Define the Query with mode FixedQueryWithOutput. In the package define a ref cursor as IN OUT parameter. To get your 3 values back, open the cursor in your procedure like "Select val1, val2, val3 from dual". Then the values should get into your query.
    Here is an example how this could be defined.
    Package:
    type return_cur IS ref CURSOR;
    Procedure:
    PROCEDURE myProc(myReturnCur IN OUT return_cur) ...
    OPEN myReturnCur FOR SELECT val1, val2, val3  FROM dual;
    Query:
    DECLARE
      MYRETURNCUR myPackage.return_cur;
    BEGIN
      myPackage.myProc(
        MYRETURNCUR => ?
    END;
    Good luck.
    Michael

  • Call procedure with named parameters

    Call procedure with positional parameters works, but with named parameters gives an ORA-907.
    This post seems similar: Re: Error with report - pkg and bind var
    Run as a script:
    set echo on
    call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false);
    call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS');
    begin dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false); end;
    gives:
    set echo on
    call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false)
    Error starting at line 2 in command:
    call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false)
    Error report:
    SQL Error: ORA-00907: missing right parenthesis
    00907. 00000 - "missing right parenthesis"
    *Cause:
    *Action:
    call dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS')
    call dbms_stats.delete_table_stats succeeded.
    begin dbms_stats.delete_table_stats ('ZZZMIG', 'CHAINED_ROWS', cascade_columns=>true, no_invalidate=>false); end;
    anonymous block completed
    I like the idea of using call, because the procedure name appears in the feedback - useful in longer scripts.
    I'm using SQL Developer Version 1.5.1 Build MAIN-5440
    on Windows XP SP3
    with database EE 10.2.0.3

    CALL is a SQL command which executes a routine
    (procedure/function)
    http://download-uk.oracle.com/docs/cd/B19306_01/server
    .102/b14200/statements_4008.htm
    whereas EXECUTE is a SQL*Plus command which executes
    a single PL/SQL statement
    http://download-uk.oracle.com/docs/cd/B19306_01/server
    .102/b14357/ch12022.htm#i2697931
    Message was edited by:
    Jens PetersenThank you very much, esp. for the links!

  • Call procedure with MS SQL from linked Oracle server

    I have a procedure on a remote server that I can call from SQL*PLUS
    set serveroutput on
    declare rez varchar2(99); msg varchar2(99); begin radar.test('AL25',rez,msg); dbms_output.put_line('Rez='||rez);
    dbms_output.put_line('Msg='||msg);
    end;
    it gives me the neccessary result.
    But I need to call the same procedure with MS SQL from a linked Oracle server, I'm trying to do it through openquery for a while, but no success yet.
    Can someone tell me what is the right syntax for that query in OPENQUERY?

    Have you tried configuring Oracle Heterogenous Services/ Transparent Gateway? This would let you link Oracle to SQL Server via a database link which should solve your problem.
    Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com

  • Calling report with no parameters from a form should report be a JSP file?

    Hi,
    I'm completely new to the Oracle environment and am having a few beginner problems all I want to find out is how to call a report from a form. I know this question has been asked before but I can't work it out from the answers because people seem to keep talking about rdf files:
    I am trying to call the report with the following code:
    Declare
         report_id REPORT_OBJECT;
         v_rep varchar2(100);
         rep_status varchar2(20);
    Begin
         report_id:= FIND_REPORT_OBJECT('EmployeeRep');
         v_rep := RUN_REPORT_OBJECT(report_id);
    END;
    My report is called 'EmployeeRep' but it saves it as a JSP file and there is no option to save as an rdf as is mentioned in other posts. I can understand the environments confusion because there is no directory information with the find_report_object command. Does the report have to be stored in a certain directory.
    All I have done with the report is created it from the emp table of the sample Scott database. Any help is appreciated and nothing is too obvious as I say I'm completely new to this.
    Thanks
    Dan

    Try to pinpoint what is going wrong:
    1. Run the report stand alone (from Reports Builder). If that doesn't work, then it won't work calling it from Forms either.
    2. Check if anything has run at all, or if there are report error messages with:
    http://localhost:port/reports/rwservlet/showjobs?
    For a standalone Report Server use:
    http://localhost:port/reports/rwservlet/showjobs?server=rep_server_name
    3. If it does work, call it from Forms. Is the report output file created (e.g. in the cache directory if destype=cache)? In your code you have run_report_object, but you won't see any output on your screen. To see the output add web.show_document(...) to your report. There are many examples in this forum if you search for run_report_object.

  • Calling a procedure from a dynamic link

    I have the following situation-
    I have a report created using SQL Query.
    I need to call a Stored Procedure(move_to_portal) through a link from one of the fields in the report (Exec_id field of the report).
    How can I do this?
    The links do not allow me to choose a stored procedure as the Target component....so maybe I have to create a dynamic link.
    How to do this? Any help would be appreciated.

    I have just another question-
    I have a procedure testing_del_archive which is being called with 2 parameters...from a dynamic link in my SQL Query.
    The following is my code....
    SELECT re.report_exec_id, re.exec_userid,
    NVL(re.batch_exec_date, re.begin_date) report_date,
    re.rows_returned,
    re.status, re.error,
    f_file_url(re.filename) file_url,
    re.comments,
    ''Archive''archive
    FROM metadev.report_execution re, metadev.report r
    WHERE re.report_id = r.report_id
    AND r.spec_number = :v_spec
    AND re.status <> 'DELETED'
    AND re.exec_userid like (DECODE(:v_user_filter,'ALL','%',:v_user_filter))
    ORDER BY begin_date DESC
    The first parameter is the value in the execution id field and the second argument is hardcoded "Archived"...
    IT GIVES AN ERROR....
    Do you guys know where I am going wrong...

  • Calling stored procedure with output parameters in a different schema

    I have a simple stored procedure with two parameters:
    PROCEDURE Test1(
    pOutRecords OUT tCursorRef,
    pIdNumber IN NUMBER);
    where tCursorRef is REF CURSOR.
    (This procedure is part of a package with REF CURSOR declared in there)
    And I have two database schemas: AppOwner and AppUser.
    The above stored procedure is owned by AppOwner, but I have to execute this stored procedure from AppUser schema. I have created a private synonym and granted the neccessary privileges for AppUser schema to execute the package in the AppUser schema.
    When I ran the above procedure from VB using ADO and OraOLEDB.Oracle.1 driver, I got the following error when connecting to the AppUser schema:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    but when I was connecting to the AppOwner schema, everything is running correctly without errors.
    Also, when I switch to the microsoft MSDAORA.1 driver, I can execute the above procedure without any problems even when connecting to the AppUser schema.
    I got this error only when I am trying to execute a stored procedure with an output parameter. All other procedures with only input parameters have no problems at all.
    Do you know the reason for that? Thanks!

    If anyone has figured this one out let me know. I'm getting the same problem. Only in my case I've tried both the "OraOLEDB.Oracle" provider and the "MSDAORA" provider and I get an error either way. Also my procedure has 2 in parameters and 1 out parameter. At least now I know I'm not the only one with this issue. :)
    '*** the Oracle procedure ***
    Create sp_getconfiguration(mygroup in varchar2, myparameter in varchar2, myvalue out varchar2)
    AS
    rec_config tblconfiguration.configvalue%type;
    cursor cur_config is select configvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter;
    begin
    open cur_config;
    fetch cur_config into rec_config;
    close cur_config;
    myvalue := rec_config;
    end;
    '** the ado code ****
    dim dbconn as new adodb.connection
    dim oCmd as new adodb.connection
    dim ors as new adodb.recordset
    dbconn.provider = "MSDAORA" 'or dbconn.provider = "OraOLEDB.Oracle"
    dbconn.open "Data Source=dahdah;User ID=didi;Password=humdy;PLSQLRSet=1;"
    set ocmd.activeconnection = dbconn
    cmd.commandtext = "{call fogle.sp_getconfiguration(?,?)}"
    'i've also tried creating a public synonym called getconfiguration and just refering to procedure by that.
    ' "{call getconfiguration(?, ?)}"
    ' "{call getconfiguration(?,?, {resultset 1, myvalue})}"
    'and numerous numerous other combinations
    set oPrm = cmd.createparameter("MYGROUP", advarchar, adparaminput, 50, strGrouptoPassIn$)
    cmd.parameters.append oPrm
    set oPrm = cmd.createParameter("MYPARAMETER", advarchar, adParamInput, 50, strParameterToPassIn$)
    cmdParameters.append oPrm
    set rs = cmd.execute

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • Call a Graphical Calc view with input Parameters from a Script Based Calc View

    Hi All.
    I am trying to call a graphical calculation view with input parameters from a script based calculation view as below but getting syntax error:
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                 WITH PARAMETERS  ('PLACEHOLDER' = ('$$IP_START_DATE$$',:START_DATE),
                                     'PLACEHOLDER' = ('$$IP_END_DATE$$',:END_DATE));
    START_DATE  and END_DATE are input parameters of the script based calculation view.
    Can anyone please help me with the correct syntax for accomplishing this?
    Thanks,
    Goutham

    Hi Gautham,
    One more option  what i would like you to try is the below option , here i have just changed the order of passing nothing else.
    SESSION_SAMPLE = SELECT SESSION_CREATE_DATE,SHA256,CA_MEASURE
                                 FROM "_SYS_BIC"."WILDFIRE/CV_SESSION_SAMPLE"
                                   ('PLACEHOLDER' = ('$$IP_END_DATE$$','$$END_DATE$$'),
                                  'PLACEHOLDER' = ('$$IP_START_DATE$$','$$START_DATE$$'))
    Regards,
    Vinoth

  • Please help to call oracle procedure with out paramter from shell script

    Hi
    I want to call a process with out parameter from shell script. I am calling process in shell script in below way
    function Process_loads {
    ( echo 'set serveroutput on size 1000000 arraysize 1'
    echo "set pagesize 0 term on verify off feedback off echo off"
    echo "BEGIN"
    echo " dbms_output.put_line('Before Calling The package'); "
    echo " x ( '$1', '$2', '$2', '$4', '$5', '$error_code'); "
    echo " dbms_output.put_line('After Calling The package'); "
    echo "EXCEPTION "
    echo " WHEN OTHERS THEN "
    echo " dbms_output.put_line('BIN_LOAD_ERROR' || SQLERRM); "
    echo " ROLLBACK;"
    echo "END;"
    echo "/" ) | sqlplus -s $USER/$PASSWORD@$SID
    Here $error_code is out paramter. All varaibles passed in process are declared with export command.
    When executing .sh it gives below error
    "sh ERROR at line 3: ORA-06550: line 3, column 99: PLS-00363: expression '' cannot be used as an assignment target ORA-06550: line 3, column 3: PL/SQL: Statement ignored".
    Please help to get rid from this error or please suggest how to call a oracle procedure with out paramter from unix shell script.
    Thanks in advance

    You can try this:
    From sql*plus
    SQL> ed
      1  create or replace procedure my_proc(p_id in int, p_result out int)
      2  as
      3  begin
      4  select 10 * p_id
      5  into p_result
      6  from dual;
      7* end my_proc;
    SQL> /
    Procedure created.
    SQL> set serveroutput on
    SQL> declare
      2  v_r int;
      3  begin
      4  my_proc(10,v_r);
      5  dbms_output.put_line(v_r);
      6  end;
      7  /
    100
    PL/SQL procedure successfully completed.
    from bash:
    testproc.sh:
    #!/bin/bash
    (echo 'set serveroutput on';
    echo 'declare';
    echo 'v_r int;';
    echo 'begin';
    echo 'my_proc(10,v_r);';
    echo 'dbms_output.put_line(v_r);'
    echo 'end;';
    echo '/';) | sqlplus -s u1/u1
    Console:
    oracle@mob-ubuntu:~$ chmod u+x testproc.sh
    oracle@mob-ubuntu:~$ ./testproc.sh
    100
    PL/SQL procedure successfully completed.With kind regards
    Krystian Zieja

  • OSB java call out with array parameters

    Hi all,
    I have a java call out with array parameters, follow the firm of java method:
    logBody2(String category, XmlObject headerXml, String[] level, XmlObject[] xml)
    The java call out have String[] and XmlObject[] arrays in intput, my question is how I can pass these arrays of values at java call out?
    Thk
    L.

    For array, comma-separated values should be passed. For e.g. -
    If input parameter is of type String[] then passed values should be comma-separated strings like - 'Anuj','Dwivedi'
    If input parameter is of type XmlObject[] then passed values should be comma-separated XmlObject like - <anuj/>,<dwivedi/>
    Regards,
    Anuj

  • Problem calling Procedure with parameter from Dynamic Page

    I received an error saying the Page not found
    here's how to reproduce the error.
    1. Create procedure in portal30 schema.
    Create or Replace PROCEDURE PORTAL30.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    2. Create Dynamic Page with following code
    <ORACLE>DECLARE
    v_total NUMBER;
    BEGIN
    ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<machine.domain:port#>/pls/portal30/PORTAL30.DYN_
    ADD_TWO_VALUES.show_parms', 'Re-Execute Procedure');
    END;</ORACLE>
    3. I clicked on Customize Link and entered 2 numbers as values for v_one and v_two.
    4. Got "The page cannot be found" error in I.E. or "The requested URL /pls/portal30/PORTAL30.DYN_SAMPLE_ADD.show was not found on this server." on Netscape
    However when I subsitute "ADD_TWO_VALUES(:v_one,:v_two, v_total);" in the dynamic page for "ADD_TWO_VALUES(3,2, v_total);", it runs just fine.
    What's wrong here? Can I not use a parameter from a dynamic page and call a procedure with it? Help is needed urgently and will be greatly appreciated.
    -Ahsun

    Hi,
    I tried with your code with few changes ,please try with them.
    Create or Replace PROCEDURE <myschema>.ADD_TWO_VALUES
    v_one IN NUMBER,
    v_two IN NUMBER,
    v_result OUT NUMBER)
    as
    begin
    v_result :=v_one+v_two;
    end;
    I created the procedure in <mySchema> and granted that to <application_schema> and made some changes
    <ORACLE>
    DECLARE
    v_total NUMBER;
    BEGIN
    <procedure_schema>.ADD_TWO_VALUES(:v_one,:v_two, v_total);
    htp.p('The total is => ');
    htp.p('<input type="TEXT" VALUE='||v_total||'>');
    htp.para;
    htp.anchor('http://<your_host>/pls/<portal_schema>/<application_schema>.DYN_FOR_OTN.SHOW_PARMS', 'Re-Execute Procedure');
    END;
    </ORACLE>
    Hope this helps.
    rahul

  • Calling a stored procedure with default parameters

    Dear all,
    I am trying to call a stored procedure that has not all the parameters compulsory, and indeed, there are some I am not interested in. Therefore, I would like to call the stored procedure initializing only some of the parameters but if I miss some of them, I have an SQLException thrown. Is there any way to do that?
    Thanks
    Marie

    Hi
    One way to do it is ---
    By using Default Parameters you can miss few parameters while calling a procedure.
    =================================================================
    As the example below shows, you can initialize IN parameters to default values. That way, you can pass different numbers of actual parameters to a subprogram, accepting or overriding the default values as you please.
    Moreover, you can add new formal parameters without having to change every call to the subprogram.
    PROCEDURE create_dept (
    new_dname VARCHAR2 DEFAULT 'TEMP',
    new_loc VARCHAR2 DEFAULT 'TEMP') IS
    BEGIN
    INSERT INTO dept
    VALUES (deptno_seq.NEXTVAL, new_dname, new_loc);
    END;
    If an actual parameter is not passed, the default value of its corresponding formal parameter is used.
    Consider the following calls to create_dept:
    create_dept;
    create_dept('MARKETING');
    create_dept('MARKETING', 'NEW YORK');
    The first call passes no actual parameters, so both default values are used.
    The second call passes one actual parameter, so the default value for new_loc is used.
    The third call passes two actual parameters, so neither default value is used.
    Usually, you can use positional notation to override the default values of formal parameters.
    However, you cannot skip a formal parameter by leaving out its actual parameter.
    For example, the following call incorrectly associates the actual parameter 'NEW YORK' with the formal parameter new_dname:
    create_dept('NEW YORK'); -- incorrect
    You cannot solve the problem by leaving a placeholder for the actual parameter.
    For example, the following call is illegal:
    create_dept(, 'NEW YORK'); -- illegal
    In such cases, you must use named notation, as follows:
    create_dept(new_loc => 'NEW YORK');
    ===============================================================
    For more details refer URL http://technet.oracle.com/doc/server.804/a58236/07_subs.htm#3651
    Hope this helps
    Regards
    Ashwini

  • Calling Oracle Stored procedure with OUT parameter from ODI

    Hi,
    I called an oracle stored procedure with following anonymous block in the ODI procedure.
    Declare
    Status varchar2(10);
    Begin
    OTM.DeleteTarget('E_KPI_TARGET_VALUE', Status);
    End;
    I want to capture the OUT parameter STATUS value in a project level variable.
    And based on its va;lue I would like to choose between 2 interfaces in my package.
    Please help me in doing this.

    Hi,
    For that kind of situation I commoly use:
    1) one step with:
    create or replace package <%=odiRef.getSchemaName("W")%>.pck_var
    Status varchar2(10);
    end;
    * transaction 9, for instance
    2) step
    Begin
    OTM.DeleteTarget('E_KPI_TARGET_VALUE', <%=odiRef.getSchemaName("W")%>.pck_var.Status);
    End;
    * transaction 9
    3) then, at an ODI variable, use a refresh like:
    select <%=odiRef.getSchemaName("W")%>.pck_var.Status from dual
    at same logical shema where the package was created.
    Does it make sense to you?

  • PLS-00306 calling a procedure with default parameters

    Hi,
    I have the following procedure :
    PROCEDURE P_SUPPRESSION_ENRG (
    DIR in VARCHAR2,
    Tab_Diff_traitee in VARCHAR2,
    TabSup in VARCHAR2,
    ColCode in VARCHAR2,
    Code in VARCHAR2,
    Trig in VARCHAR2 default '',
    Etat in VARCHAR2 default '',
    TypMod in VARCHAR2 default '',
    IndRev in VARCHAR2 default '',
    Crd out NUMBER
    ) is
    END P_SUPPRESSION_ENRG;
    When I run this procedure without the parameters Trig,Etat,TypMod and IndRev, I receive the error PLS-00306 :
    INFOLIG.pck_diff.P_SUPPRESSION_ENRG(Directory,'DIFF_PYLONE_TYPE','DIFF_PYLONE_TYPE','DFP_PYL_CODE_PYLONE',rec.OIP_PYL_CODE_PYLONE,Icrd);
    PLS-00306
    wrong number or types of arguments in call to P_SUPPRESSION_ENRG.
    What have I to do to run this procedure without the parameters Trig,Etat,TypMod and IndRev ?
    Regards,
    Rachel

    hi, i think you are only passing 6 parameters when you called out the procedure p_supperion_enrg. your procedure requires a 10 parameters.
    if you do not want to include Trig,Etat,TypMod and IndRev you can simply put a null value.
      INFOLIG.pck_diff.P_SUPPRESSION_ENRG(Directory,
                                          'DIFF_PYLONE_TYPE',
                                          'DIFF_PYLONE_TYPE',
                                          'DFP_PYL_CODE_PYLONE',
                                          rec.OIP_PYL_CODE_PYLONE,
                                          Null,
                                          Null,
                                          Null,
                                          Null,
                                          Icrd); also you don't need to expplicitly defualt a parameter to null value. it is understood that parameters are initially default to null values.
      PROCEDURE P_SUPPRESSION_ENRG ( DIR              in VARCHAR2,
                                     Tab_Diff_traitee in VARCHAR2,
                                     TabSup           in VARCHAR2,
                                     ColCode          in VARCHAR2,
                                     Code             in VARCHAR2,
                                     Trig             in VARCHAR2,
                                     Etat             in VARCHAR2,
                                     TypMod           in VARCHAR2,
                                     IndRev           in VARCHAR2,
                                     Crd             out NUMBER ) IS
      END P_SUPPRESSION_ENRG;

Maybe you are looking for