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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -