Search code examples
oracleplsqlsql-like

How open parentheses in if expression?


I have expression. How I can open or rewrite this?

if not ((A or B) and PAR like '%3%') then
    --do some code
end if;

Can do this more simple? Please, give me a link for another expressions as example.


Solution

  • The following should be close to what you're looking for:

    IF A = FALSE AND B = FALSE AND REGEXP_LIKE(PAR, '[^3]') THEN
      -- code here
    END IF;
    

    Share and enjoy.