functions in packages
From: Dwayne <trifaceted_at_aol.com>
Date: 12 Feb 2003 21:04:20 -0800
Message-ID: <b51abadc.0302122104.60796c4c_at_posting.google.com>
[Quoted] 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.
Date: 12 Feb 2003 21:04:20 -0800
Message-ID: <b51abadc.0302122104.60796c4c_at_posting.google.com>
[Quoted] 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> /
[Quoted] 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
[Quoted] I spent 3 hours on this trying different combos but nothing. Received on Thu Feb 13 2003 - 06:04:20 CET