Re: How to split up phone numbers?

From: Vojtěch Rylko <vojta(dot)rylko(at)seznam(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to split up phone numbers?
Date: 2012-02-21 08:13:53
Message-ID: 4F435241.1040307@seznam.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Maybe some processing using external libraries? For example
http://code.google.com/p/libphonenumber/ and you may try it there
http://libphonenumber.appspot.com/

Vojta

Dne 20.2.2012 15:49, Andreas napsal(a):
> Hi,
> is there a way to split up phone numbers?
> I know that's a tricky topic and it depends on the national phone
> number format.
> I'm especially interested in a solution for Germany, Swizerland and
> Austria.
>
> I've got everything in a phone number column that makes hardly sense
> like:
> +49432156780
> 0049 4321 5678 0
> 04321/5678-0
> and so on...
> Those 3 samples are actually the same number in different notations.
>
> Aim would be to get a normalized number split up in 4 seperate columns
> nr_nation
> nr_city
> nr_main
> nr_individual
>
> so I end up with
> 49 4321 5678 0 for central
> 49 4321 5678 42 for Mr. Smith
>
> Is this doable?
>
> It would be a start to at least split off nr_nation and nr_city.
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message sunpeng 2012-02-21 10:09:00 Why warm-standby doesn't work using file-based log shipping method?
Previous Message Maxim Boguk 2012-02-21 07:07:13 Re: Unfamous 'could not read block ... in file "...": read only 0 of 8192 bytes' again