Re: How to split up phone numbers?

Поиск
Список
Период
Сортировка
От Tim Landscheidt
Тема Re: How to split up phone numbers?
Дата
Msg-id m3wr7f986v.fsf@passepartout.tim-landscheidt.de
обсуждение исходный текст
Ответ на How to split up phone numbers?  (Andreas <maps.on@gmx.net>)
Список pgsql-sql
(anonymous) wrote:

> 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.

I seem to faintly remember that there are some anomalies in
the German area codes, i. e. "+49 xy" may be city A, with
"+49 xyz" being city B.  Obviously, you will also not be
able to differentiate between normal and extension numbers
if they aren't properly marked up in the input.

Tim




В списке pgsql-sql по дате отправления:

Предыдущее
От: Ron Peterson
Дата:
Сообщение: on insert rule with default value
Следующее
От: Marcin Krawczyk
Дата:
Сообщение: Re: Function definitions - batch update