BEGIN
:P2_RESTUSER ='Y';
IF:P2_USERCOMMENT IS NOT NULL
THEN
Return True;
ELSE
Return False;
end if;
end;
I am trying to add validate in a page.what I am trying to do is if p2_restuser value is 'y' and p2_usercomment is not null then return true, and any other condition returns the error prompt. However, I am getting following error.
ORA-06550: line 6, column 16: PLS-00103: Encountered the symbol "BEGIN" when expecting one of the following: ( - + case mod new not null continue avg count current exists max min prior sql stddev sum variance execute forall merge time timestamp interval date pipe
How can I fix this code to work the way I wanted?
thank you
:P2_RESTUSER
. The assignment operator in PL/SQL is:=
. – Chris Hep:=
instead of=
For future help provide information about type of validation that you use: - PL/SQL Expression - PL/SQL Error - PL/SQL Function Returning Boolean (i believe this is the one) - PL/SQL Function Returning Error – jareeqIF:P2_USERCOMMENT
all strung together. You should have a space before the colon. – Chris Hep