79433082

Date: 2025-02-12 12:45:08
Score: 2
Natty:
Report link

I did some research and found that the 'like' operator alone doesn't support regular expression; instead, Oracle SQL supports it by using the 'REGEXP_LIKE' keyword.

(^[A-Za-z0-9.%!#$/?^|~]+@[A-Za-z0-9.-]+.[A-Za-z]{2,}$)

I tried your code in this way:

SELECT EmailAddress CASE WHEN EmailAddress REGEXP_LIKE(^[A-Za-z0-9.%!#$/?^|~]{1,6}+@[A-Za-z0-9.-]+.[A-Za-z]{2,}$) THEN'Valid' ELSE 'INVALID' END AS valid_email FROM Database Where EmailAddress is not null;

I hope this might be helpful

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Low reputation (1):
Posted by: Sri Tharanya G