sql server - SQL: Search for specific customer who have specific domian in their email address -
i have table contains customer's info. wanted select customer have below domain in email address. how can that?
domain such as
aol.com gmail.com yahoo.com msn.com
how can make select query clause?
for example:
select id, firstname, lastname customer_info email '%gmail.com'
i can't create if have many domain. please suggect if other option available
there way ignore "like" such query
select distinct ci.customerid , ci.firstname, ci.lastname, customer_info ci (nolock) substring(email,patindex('%@%',email)+1,100) in ('aol.com','gmai.com','yahoo.com','msn.com')
Comments
Post a Comment