Re: Is there a way to remove every character but numbers? - Mailing list pgsql-sql

From Viktor Bojović
Subject Re: Is there a way to remove every character but numbers?
Date
Msg-id CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com
Whole thread Raw
In response to Is there a way to remove every character but numbers?  (Andreas <maps.on@gmx.net>)
List pgsql-sql


On Sun, Feb 5, 2012 at 2:47 PM, Andreas <maps.on@gmx.net> wrote:
Hi,

I need to clean up a text column so that it just contains numbers or the "+" sign if it is the first character of the string.

Well, it is needed to normalise up a phone number column.
So it'd be great if the "+" could be transformed in "00" in the same step.

--
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

try regexp_replace


--
---------------------------------------
Viktor Bojović
---------------------------------------
Wherever I go, Murphy goes with me

pgsql-sql by date:

Previous
From: Andreas
Date:
Subject: Is there a way to remove every character but numbers?
Next
From: Achilleas Mantzios
Date:
Subject: Re: array dimensions, pg_catalog.pg_attribute and the \d command