1 Reply Latest reply: Feb 26, 2013 10:21 PM by HamidHelal RSS

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

    992892
      hi i am getting following error pls help

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


      my sp is

      create or replace procedure udt_sal
      (p_sal out emp.salary%type, p_cursor out sys_refcursor)
      is
      v_count number(5);
      begin
      open p_cursor for
      select salary into p_sal from emp;
      if p_sal < 500 then
      update emp set salary=salary+500;
      v_count:=sql%rowcount;
      dbms_output.put_line('updated records:');
      end if;
      end;
      /
      show errors

      pls help me with above eeror



      then i called it using following

      set serveroutput on
      declare
      p_sal emp.salary%type;
      v_cursor sys_refcursor;
      v_count number;
      begin
      udt_sal(p_sal);
      fetch v_cursor into p_sal;
      dbms_output.put_line(p_sal);
      v_count:=sql%rowcount;
      dbms_output.put_line('total update is:'|| v_count);
      end;
        • 1. Re: PLS-00306: wrong number or types of arguments in call to 'UDT_SAL'
          HamidHelal
          989889 wrote:
          hi i am getting following error pls help

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


          my sp is

          create or replace procedure udt_sal
          (p_sal out emp.salary%type, p_cursor out sys_refcursor)
          is
          v_count number(5);
          begin
          open p_cursor for
          select salary into p_sal from emp;
          if p_sal < 500 then
          update emp set salary=salary+500;
          v_count:=sql%rowcount;
          dbms_output.put_line('updated records:');
          end if;
          end;
          /
          show errors

          pls help me with above eeror



          then i called it using following

          set serveroutput on
          declare
          p_sal emp.salary%type;
          v_cursor sys_refcursor;
          v_count number;
          begin
          udt_sal(p_sal);
          fetch v_cursor into p_sal;
          dbms_output.put_line(p_sal);
          v_count:=sql%rowcount;
          dbms_output.put_line('total update is:'|| v_count);
          end;
          First of all, you post in wrong forum. Please post at {forum:id=75}. Before posting there close it and mark as answered.

          Second your procedure calling was wrong. It would be
           udt_sal(p_sal,v_cursor);
          Mark correct/helpful to help others to get right answer(s).*