September 29, 2015 at 6:24 am
Hi all,
I have a question that maybe is asked before. I have looked for the answer all over the place but I can’t find the exact 1 that solves my question.
How can I replace more than 1, different character, in the same value / cell?
e.g. ångermüller should become angermueller (å to a, and ü to ue)
Multiple combinations of special characters are possible in 1 word: é and á, or ö and í etc etc
Is there a way to do this?
Thanks in advance
Hein
September 29, 2015 at 6:56 am
SpeedSkaterFan (9/29/2015)
Hi all,I have a question that maybe is asked before. I have looked for the answer all over the place but I can’t find the exact 1 that solves my question.
How can I replace more than 1, different character, in the same value / cell?
e.g. ångermüller should become angermueller (å to a, and ü to ue)
Multiple combinations of special characters are possible in 1 word: é and á, or ö and í etc etc
Is there a way to do this?
Thanks in advance
Hein
Use nested REPLACE:
SELECT REPLACE(REPLACE(surname,'ü','ue'),'å','a')
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 29, 2015 at 7:16 am
Hi Chris,
Thank you for your reply.
It works like a charm 🙂
1 question if permitted: is there a limit to the number of replace functions you can use "in 1 go"?
Anyway
Thanks again
Hein
September 29, 2015 at 7:46 am
Don't know tbh - but I've used it a few times with 36.
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
September 29, 2015 at 7:54 am
Sounds good,
36 will do!
Thanks again
Hein
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply