Stripping whitespace from a select

Stripping whitespace from a select

am 03.07.2007 04:45:03 von Leigh Sharpe

--2_0_17_d08f81MHTML_=_01
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi All,
I have a table which contains phone numbers. I want to extract these
phone numbers in a common format, but they have not been entered the
same way. Is there any easy way of removing whitespace and brackets in
one go? The best I can come up with so far is this rather ugly one:
=20
SELECT REPLACE(REPLACE(REPLACE(REPLACE(phone_work,"(",""),")", "" ), "
", "" ),"-","") FROM contacts WHERE phone_work!=3D"";
=20
Which will remove all "(", ")", "-", and spaces. Suerly there's a better
way?
=20
Regards,
Leigh
=20
Leigh Sharpe
Network Systems Engineer
Pacific Wireless
Ph +61 3 9584 8966
Mob 0408 009 502
Helpdesk 1300 300 616
email lsharpe@pacificwireless.com.au
web www.pacificwireless.com.au
=20


--2_0_17_d08f81MHTML_=_01--