Re: Pl/SQL Embed Function within Procedure or other Function?
From: Adrian Billington <billiauk_at_yahoo.co.uk>
Date: 22 Feb 2002 05:01:33 -0800
Message-ID: <dee17a9f.0202220501.108e730e_at_posting.google.com>
END get_lower;
BEGIN
DBMS_OUTPUT.PUT_LINE(get_lower(myVar1,myVar2)); END; But I would use packages if I were you - everybody else does.
Date: 22 Feb 2002 05:01:33 -0800
Message-ID: <dee17a9f.0202220501.108e730e_at_posting.google.com>
Larry
Yes you can. It's called "forward declaration" - e.g
CREATE OR REPLACE PROCEDURE myDummyProc AS
myVar1 varchar2(10) := 'FORWARD ';
myVar2 varchar2(20) := 'DECLARATION';
FUNCTION get_lower (
str1_in IN VARCHAR2, str2_in IN VARCHAR2 ) RETURN VARCHAR2 IS BEGIN RETURN LOWER(str1_in||str2_in);
END get_lower;
BEGIN
DBMS_OUTPUT.PUT_LINE(get_lower(myVar1,myVar2)); END; But I would use packages if I were you - everybody else does.
Regards
Adrian Received on Fri Feb 22 2002 - 14:01:33 CET