Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 06DA31EB83E6 for ; Thu, 23 Feb 2012 05:32:06 -0400 (AST) Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S0V1t-00025h-A9 for pgsql-sql@postgresql.org; Thu, 23 Feb 2012 09:32:05 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S0V1d-0007rb-5r for pgsql-sql@postgresql.org; Thu, 23 Feb 2012 10:31:45 +0100 Received: from ip-118-90-125-190.xdsl.xnet.co.nz ([118.90.125.190]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Feb 2012 10:31:45 +0100 Received: from jasen by ip-118-90-125-190.xdsl.xnet.co.nz with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 23 Feb 2012 10:31:45 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-sql@postgresql.org From: Jasen Betts Subject: Re: How to split up phone numbers? Date: 23 Feb 2012 09:14:32 GMT Organization: Dis (not Dat) Organisation Lines: 28 Message-ID: References: <4F425DB9.3060604@gmx.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: ip-118-90-125-190.xdsl.xnet.co.nz X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-18 (Linux) X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/75 X-Sequence-Number: 36368 On 2012-02-20, Andreas wrote: > Hi, > is there a way to split up phone numbers? several. I wouldn't trust a computer to do any of them. > 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. normalise them. push them all towards the first format. the rules are relatively simple. now if you want to split that into parts that means something you can probably get the gorey details from the phone company. but if you just want do do it for display split it wherever you like. -- ⚂⚃ 100% natural