Results 1 to 3 of 3

Thread: Simple Error?

  1. #1
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441

    Question Unanswered: Simple Error?

    Code:
    CREATE OR REPLACE  PROCEDURE "FYP"."V"  RETURN NUMBER AS
      x   NUMBER;
     BEGIN 
      x := 72600;
      RETURN x;
     END;
    This simple code produces the following error: and I can't find out why. This code should be valid, I got it from an example on http://www.databasejournal.com/featu...0893_1444101_3
    Line # = 1 Column # = 22 Error Text = PLS-00103: Encountered the symbol "RETURN" when expecting one of the following: ( ; is with authid as cluster compress order using compiled wrapped external deterministic parallel_enable pipelined The symbol "authid was inserted before "RETURN" to continue.

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: Simple Error?

    Originally posted by rhs98
    Code:
    CREATE OR REPLACE  PROCEDURE "FYP"."V"  RETURN NUMBER AS
      x   NUMBER;
     BEGIN 
      x := 72600;
      RETURN x;
     END;
    This simple code produces the following error: and I can't find out why. This code should be valid, I got it from an example on http://www.databasejournal.com/featu...0893_1444101_3
    It's because PROCEDUREs do not return values. Change the word PROCEDURE to FUNCTION and it will work.

  3. #3
    Join Date
    Feb 2002
    Location
    San Francisco, CA
    Posts
    441

    Thumbs up



    How DUMB do I feel!!!! lol. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •