Hi I'm facing the following problem:
I have phonedata (bought, imported etc...) which now has different formats like
0123/4567
0123 4567
0123/4567 89
(0)123/4567
+00 123456789
I get a "clean" value like 01234567 from the PBX.
So what I would need is something like this (beware, pseudocode)
SELECT pbx.* FROM pbx WHERE pbx.phone LIKE REPLACE(REPLACE(pbx.mobile,' ', ''), '/', '')...
I know this is saniting hell but since all coworkers enter numbers like they please and the third-party lists also consist of a wild variety of data I can't do sanitizing on the records themselves. I also don't want to eat every possible format getting the values above clean would suffice but I can't wrap my head arround how to query that.
I hope you can help me.