PLS-00306 wrong number or types of arguments in call to

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • m sowjanya

    PLS-00306 wrong number or types of arguments in call to

    Hi
    i am getting this error message when the following script is running

    execute sp_GetTrialInfo ();

    Code:
    create or replace procedure sp_GetTrialInfo
      (
        
        parStudy_Name OUT  mivrs_studyinfo.study_name %type,
        parContact_Name OUT mivrs_studyinfo.contact_name %type,
        parPhone_Number OUT mivrs_studyinfo.phone_number %type,
        parDescription OUT mivrs_studyinfo.description %type
      )
      AS
      BEGIN
        SELECT study_name,contact_name,phone_number,description
        INTO
               parstudy_name,parcontact_name,parphone_number,pardescription
        FROM mivrs_studyinfo;
        
    END sp_GetTrialInfo;
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Becuase you ar einvoking a procedure that has four OUT parameters without mentioning the parameter names to which the values will be returned by the procedure.

    You have to do something like:

    [code=oracle]
    declare
    study_name mivrs_studyinfo .study_name%typ e;
    c_name mivrs_studyinfo .contact_name%t ype;
    v_ph mivrs_studyinfo .phone_number%t ype;
    v_desc mivrs_studyinfo .description%ty pe;
    BEGIN
    sp_GetTrialInfo (study_name,c_n ame,v_ph,v_Desc );
    DBMS_OUTPUT.PUT _LINE(study_nam e||','||c_name| |','||v_ph||',' ||v_Desc);
    END;
    /
    [/code]

    Comment

    Working...