I have created fallowing function
create or replace function check_salary(empNum in number, eNewSalary
number)
return number
is
eOldSalary number;
begin
select sal into eOldSalary from emp where empno = empNum;
if eOldSalary > eNewSalary then
        return -1;
else
        return 1;
end if;
end check_salary;
/

and I tried to execute the function like this,

SQL> variable salary number;
SQL> variable eNumber number;
SQL> exec :eNumber, :salary := check_salary(7934, 1);
BEGIN :eNumber, :salary := check_salary(7934, 1); END;

But I end up with the fallowing error.

              *
ERROR at line 1:
ORA-06550: line 1, column 15:
PLS-00103: Encountered the symbol "," when expecting one of the
following:
:= . ( @ % ; indicator
The symbol "; was inserted before "," to continue.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to