Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

PL/SQL Expression Error ORA-065550 - not sure where error is, thx

SQLgrrlOct 19 2022

Here is the error:
ORA-06550: line 1, column 106: PLS-00103: Encountered the symbol "DECLARE" when expecting one of the following: ( - + case mod new not null <an identifier> <a double-quoted delimited-identifier> <a bind variable> continue avg count current exists max min prior sql stddev sum variance execute for all merge time timestamp interval date <a string literal with character set specification> <a number> <a single-quoted SQL string> pipe <an alternatively-quoted string literal with character set.

This is the PL/SQL Expression I am trying to use in a Validation:
Declare
chk_not_requestor boolean;
begin
IF
:P5_REQUESTOR_NAME != '' AND
:P5_LEADER_NAME != '' AND
:P5_REQUESTOR_NAME =:P5_LEADER_NAME
then chk_not_requestor :=FALSE;
ELSE
chk_not_requestor :=TRUE;
END IF;
return chk_not_requestor;
end;
~~~~~~~~~~~
Basically, I want to ensure the two fields are not null and then compare them...
if two fields are the same, then return FALSE (do not allow request)
if two fields are not the same, then return TRUE (go ahead allow request)
Is it the syntax? or ...?
I did a search and looked at many examples, but still am scratching my head on why I keep getting an error, tried fiddling with it, get same error. I am new to APEX, please forgive my ignorance... thanks :)

This post has been answered by InoL on Oct 19 2022
Jump to Answer
Comments
Post Details
Added on Oct 19 2022
2 comments
912 views