Skip to content

Instantly share code, notes, and snippets.

@giraam
Last active December 28, 2015 07:49
Show Gist options
  • Save giraam/7467116 to your computer and use it in GitHub Desktop.
Save giraam/7467116 to your computer and use it in GitHub Desktop.
Retrieve only valid email addresses from a query in Oracle
SELECT NVL(LOWER(T.EMAIL),'-')EMAIL
FROM TABLE_NAME T
WHERE REGEXP_LIKE(NVL(LOWER(T.EMAIL),'-'), '^[a-zA-Z0-9!#$%''\*\+-/=\?^_`\{|\}~]+@[a-zA-Z0-9._%-]+\.[a-zA-Z]{2,4}$');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment