So I have a bunch of users in a column that get refreshed as:
Bill@test.comXYZ
Tom@test.comXYZ
John@test.comXYZ
We refresh the database each week and I need to update these appropriate emails to:
Bill@domain.com
Tom@domain.com
John@domain.com
I figured I can use concat to do the latter, but I am stuck on the former issue. Is there a way to split the values (like split Bill@test.comXYZ into Bill – @test.comXYZ and then remove the @TEXT values?).
Anyways, any help will be much appreciated.
You can use the mySQL replace function, i.e.
http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_replace