Re: loading procedures with sql*plus

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 27 Mar 2000 21:06:51 +0200
Message-ID: <954184431.17814.0.pluto.d4ee154e_at_news.demon.nl>


create or replace procedure etc....

Hth,

Sybrand Bakker, Oracle DBA

<asj_at_my-deja.com> wrote in message news:8bo8i0$gis$1_at_nnrp1.deja.com...
> Hi,
>
> 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 - 21:06:51 CEST

Original text of this message