Advertisement
Guest User

Untitled

a guest
Jul 27th, 2016
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. abcs12@yahoo.com,abcs@gmail.com,cityname
  2. cityname,zipcode,abcs@gmail.com
  3. abcs@officedomain.com,cityname,abc@gmail.com
  4. apartment,streetname,cityname,abc@gmail.com,abcd@yahoo.com
  5.  
  6. select
  7. concat(trim(substring_index(substring_index(ResidenceAddress1, '@', '1'), ' ', -1)), '@gmail.com') as mail
  8. ,ResidenceAddress1
  9. from mytable
  10.  
  11. select concat(substring_index((substring_index(Residence_Address1, '@', 2)),'@gmail',1),'@gmail.com') as mail, residence_address1
  12. from mytable
  13. where Residence_Address1!="" and Residence_Address1 like '%gmail%'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement