I am trying to use REGEXP_LIKE function in IF.
IF REGEXP_LIKE('NUM','^\\d{11}$')
THEN
BEGIN
<My code>
END
END IF;
Error coming at END IF is:
Syntax error. Partially recognized rules.
Please advise where I am going wrong.
>Solution :
You are getting an error because you are missing a semicolon after END within your IF statement. Below is an example of valid code:
BEGIN
IF REGEXP_LIKE ('NUM', '^\\d{11}$')
THEN
BEGIN
--Some code here
NULL;
END;
--More code here
NULL;
END IF;
END;