Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Stored procedure problems

Re: Stored procedure problems

From: Robert Goold <robert_at_rgoold.spamnot.freeserve.co.uk>
Date: Sat, 19 Feb 2000 11:01:51 GMT
Message-ID: <38ae7813.52946052@news.compuserve.com>


Max is a PL/SQL reserved word, you can't use it as a variable name.

Robert

On 14 Feb 2000 15:57:11 GMT, kirk_at_kaybee.org wrote:

>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.
Received on Sat Feb 19 2000 - 05:01:51 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US