2 Replies Latest reply on Nov 7, 2012 2:33 AM by rp0428

    ORA-01422: exact fetch returns more than requested number of rows

      Hey guys can you really help me i tried to create trigger for check salary based min and max salary .. but i have a little problem in here ...
      so i really need your help .. i'm sorry for my bad english

      create or replace procedure check_salary(job_id in employees.job_id%type, salary in employees.job_id%type)
      v_minsalary jobs.min_salary%type;
      v_maxsalary jobs.max_salary%type;
      select min_salary, max_salary
      into v_minsalary, v_maxsalary
      from jobs
      where job_id=job_id;
      if salary <= v_minsalary and
      salary >= v_maxsalary then
      raise_application_error(-20505,'Invalid Salary'||salary||'Salaries for job'||job_id||'must between'||v_minsalary||'and'||v_maxsalary);
      end if;