0

I am migrating from mysql to MS SQL server. I need to re-factor the below query to be compatible with sql server

SELECT email 
FROM emailexcursions 
WHERE email NOT REGEXP '^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*((\.[A-Za-z]{2,}){1}$)'

REGEXP is not available in sql server, does anyone know a workaround for this?

1

1 Answer 1

0

You may write external function in C#/DLL and implement REGEXP there. BUT it is better to check the email before storing in DB.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.