Hello All,
if i have a column for emails, and if i want to replace all gmail.com and yahoo.com to outlook.com in one syntax
Replace(email,'gmail.com' OR ' yahoo.com', ' outlook.com') didn't work.
your help is much appreciated.
Regards
question about replace function is SQL
-
- BronzeLounger
- Posts: 1210
- Joined: 01 May 2016, 09:58
-
- Administrator
- Posts: 78379
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: question about replace function is SQL
Use two nested Replace functions:
Replace(Replace(email, 'gmail.com', 'outlook.com'), 'yahoo.com', 'outlook.com')
Replace(Replace(email, 'gmail.com', 'outlook.com'), 'yahoo.com', 'outlook.com')
Best wishes,
Hans
Hans
-
- BronzeLounger
- Posts: 1210
- Joined: 01 May 2016, 09:58
Re: question about replace function is SQL
thank you very much dear Hans, as usual working great.