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 :)