Subject Best way to store Phone Numbers ??
Author Rich Pinder
Thanks Daniel and Lucas for replies.

Should have mentioned - I'm located in that big country with gas
guzzling cars (Los Angeles, to be exact).

My needs are much simpler here than the complex number issues you have -
and I'm not allowing for non-US numbers.

So all I'm wanting to do is turn:

8185223329

into:

(818) 522-3329

(which was why I said simple picture masks for languages like Delphi
take care of lots of headaches for user entry).

I'm really wondering if storing as a compact string of all digits OUT
WEIGHS the overhead of using a function to present the format more
politely.
Looking quickly at Apendix I in Helen's book, something like this could
get me there :

select '(' || substr(tele1,1,3) || ') ' || substr(tele1,4,3) || '-' ||
sright(tele1,4)

(but, thats ugly, eh ??). I just thought a UDF to handle the whole
thing could help - but just wanted to see if there was one already (not
sure i'm up to writing them yet)

Thanks again

Rich Pinder
USC School of Medicine


Daniel Albuschat wrote:
On Mon, 07 Mar 2005 13:25:01 -0800, Rich Pinder <rpinder@...> wrote:

> what have you all done regarding handling Phone numbers ??

Hi there.

Well, phone numbers aren't exactly an easy topic. Especially if your
application will be localised to other countries.

In Germany, we have some formatting rules similar to these: