Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored procedure problems
Try this SqlPlus command:
show error
It should give you the lines and terse messages for each error.
Paul Cluiss
Richardson, Texas
kirk_at_kaybee.org wrote:
> I am trying to create a stored procedure to create a new account. The
> tables are all in the 'udb' schema. My problem is that this procedure
> has errors, but I don't know where they are or how to determine where
> they are.
>
> Here is the commands I used to create the pertinent DB elements:
>
> CREATE TABLE users (u_id int primary key not null, u_name varchar2(20)
> not null, u_index int not null);
>
> CREATE SEQUENCE uid_seq INCREMENT BY 1 START WITH 1 MAXVALUE 2147483648
> nocycle nocache noorder;
>
> CREATE FUNCTION create_account (newname IN VARCHAR2)
> RETURN number
> AS
> max number;
> BEGIN
> SELECT max(u_index)
> INTO max
> FROM udb.users
> WHERE u_name = newname;
>
> max := (max + 1);
>
> INSERT INTO udb.users (u_id, u_name, u_index)
> VALUES (udb.uid_seq.nextval, newname, max);
>
> RETURN max;
>
> END;
>
> When I run the last command (CREATE FUNCTION) in 'sqlplus' it just
> tells me:
> Warning: Function created with compilation errors.
>
> I would appreciate any help you could give me on this.
>
> --
> Kirk Bauer -- CmpE, Georgia Tech -- kirk_at_kaybee.org -- Avid Linux User
> GT Sport Parachuting Club! http://cyberbuzz.gatech.edu/skydive
> Opinions expressed are my own, but they should be everybody's.
Received on Mon Feb 14 2000 - 11:20:35 CST