Skip site navigation (1) Skip section navigation (2)

Is there a way to remove every character but numbers?

From: Andreas <maps(dot)on(at)gmx(dot)net>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: Is there a way to remove every character but numbers?
Date: 2012-02-05 13:47:41
Message-ID: 4F2E887D.3040108@gmx.net (view raw or flat)
Thread:
Lists: pgsql-sql
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.

Responses

pgsql-sql by date

Next:From: Viktor BojovićDate: 2012-02-05 13:56:31
Subject: Re: Is there a way to remove every character but numbers?
Previous:From: Dmitriy IgrishinDate: 2012-02-03 20:21:49
Subject: Re: array dimensions, pg_catalog.pg_attribute and the \d command

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group