loading procedures with sql*plus

From: <asj_at_my-deja.com>
Date: Mon, 27 Mar 2000 18:17:09 GMT
Message-ID: <8bo8i0$gis$1_at_nnrp1.deja.com>



Hi,

[Quoted] i'm trying to use sql*plus to load a stored procedure into an oracle 8i database server from a solaris box. I have the procedure in a file and call sql*plus to load it as:

/opt/oracle/bin/sqlplus -S xyz/zbc_at_testdb @filename.sql

Once i make this call, sql*plus just hangs. Placing the same SQL statements without the procedure constructs works. Any ideas? The contents of filename.sql are below.

Thanks,

alan



PROCEDURE raise_salary (emp_id INTEGER, amount REAL) IS

   current_salary REAL;
   salary_missing EXCEPTION;
BEGIN
SELECT user_id INTO current_salary FROM staff

      WHERE empno = emp_id;
   IF current_salary IS NULL THEN

      RAISE salary_missing;
EXCEPTION
   WHEN NO_DATA_FOUND THEN
      INSERT INTO emp_audit VALUES (emp_id, 'No such number');    WHEN salary_missing THEN

      INSERT INTO emp_audit VALUES (emp_id, 'Salary is null'); END raise_salary;

exit


Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Mar 27 2000 - 20:17:09 CEST

Original text of this message