pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Viktor Bojović <viktor.bojovic@gmail.com>
To: Andreas <maps.on@gmx.net>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: Is there a way to remove every character but numbers?
Date: Sun, 5 Feb 2012 14:56:31 +0100
Message-ID: <CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com> (raw)
In-Reply-To: <4F2E887D.3040108@gmx.net>
References: <4F2E887D.3040108@gmx.net>

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<http://www.postgresql.org/mailpref/pgsql-sql;
>

try regexp_replace


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

view thread (2+ messages)

Message-ID: <CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com>
Permalink:  ../CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com/
Also on:    postgresql.org/message-id/CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: viktor.bojovic@gmail.com, maps.on@gmx.net
  Subject: Re: Is there a way to remove every character but numbers?
  In-Reply-To: <CAJu1cLYLWkfQb6J8bRPGipP12FWP8Vxfdj9RHsdGprPBvNmLiQ@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox