Hi
I am trying to create a function inside the package.
In The Package BODY I have defined the function, but in the package definition, it is giving me syntax errors.
- Error(15,3): PLS-00103: Encountered the symbol ";" when expecting one of the following: return
- Error(39,1): PLS-00103: Encountered the symbol "END" when expecting one of the following: begin function pragma procedure subtype type current cursor delete exists prior
What I may be doing wrong here.
Thanks,
Ken
Inside Package BODY :
/*FUNCTION to Form the Query*/
FUNCTION UDF_FORMQUERY(
IN_CASEID VARCHAR2,
IN_SRCLYR VARCHAR2,
IN_SRC_CONDN VARCHAR2
)
RETURN VARCHAR2
AS
varSQLQuery VARCHAR2(10000);
BEGIN
varSQLQuery:= 'test Query' ;
RETURN varSQLQuery;
DBMS_OUTPUT.PUT_LINE(varSQLQuery);
END UDF_FORMQUERY;
Inside Package Definition :
create or replace PACKAGE BODY MY_SQUERY
AS
FUNCTION UDF_FORMQUERY(
IN_CASEID VARCHAR2,
IN_SRCLYR VARCHAR2,
IN_SRC_CONDN VARCHAR2)
RETURN VARCHAR2
AS varSQLQuery VARCHAR2(10000);
END MY_SQUERY;