Alright I have something like this(I messed it up…) –
Id Name City
1 XXX - New Plano
2 XXX - XXX - New1 Dallas
3 XXX - XXX - XXX - New2 Sacramento
4 XXX - New3 Houston
5 XXX - XXX - New4 Austin
So, I want to replace all the occurrence with more that one XXX prefix to just 1. For e.g id 2 should have Name=XXX - New2. How would go about achieving this ? Even a query basically to check for a prefix and replace it with the name would work I think and then I can add the prefix again ? I mean set all the records just to say New,New2..so on…and then I can add XXX prefix to it ?
You can remove all instances of ‘XXX – ‘ with the string replace function.
Alternately, to keep a single instance you could use: