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 -> functions in a package

functions in a package

From: Dwayne <trifaceted_at_aol.com>
Date: 12 Feb 2003 21:01:18 -0800
Message-ID: <b51abadc.0302122101.78c513a8@posting.google.com>


I am having trouble putting a function in a package body the problem now lies in putting the function in the package body. I keep getting syntax errors.

let me show you:

CREATE OR REPLACE PACKAGE CAP
IS
FUNCTION LAST_CAP RETURN VARCHAR2;
END;
/

Package created.

  1 CREATE OR REPLACE PACKAGE BODY CAP
  2 IS
  3 FUNCTION LAST_CAP
  4 (NAME VARCHAR2)
  5 RETURN VARCHAR2
  6 IS
  7 BEGIN
  8 RETURN LOWER(SUBSTR(NAME,1,LENGTH(NAME)-1))||UPPER(SUBSTR(NAME,-1));   9 END LAST_CAP;
10* end;
SQL> / Warning: Package Body created with compilation errors.

SQL> show error
Errors for PACKAGE BODY CAP:

LINE/COL ERROR

-------- -----------------------------------------------------------------
3/10     PLS-00323: subprogram or cursor 'LAST_CAP' is declared in a
         package specification and must be defined in the package body


I spent 3 hours on this trying different combos but nothing. Received on Wed Feb 12 2003 - 23:01:18 CST

Original text of this message

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