From: | <ghaverla(at)freenet(dot)edmonton(dot)ab(dot)ca> |
---|---|
To: | Bryan Irvine <bryan(dot)irvine(at)kingcountyjournal(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: phone number list |
Date: | 2003-09-10 17:17:07 |
Message-ID: | Pine.A41.3.95.1030910111451.19494E-100000@fn2.freenet.edmonton.ab.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On 10 Sep 2003, Bryan Irvine wrote:
> I have a db that contains phone numbers
>
> The data that get inserted looks like this
>
> 425 555 1212
>
> I have a script that inserts that into the DB, the problem is that
> sometimes the suffix might start with a 0 and is getting truncated.
>
> so
>
> 425 555 0212
>
> ends up being
>
> 425 555 212. How can I fix this?
You are using a numerical field (or fields) for the number,
when you should be using a string. For one thing, the 123-4567
or 123-456-7890 numbers are not universal. The actual format
of the number depends on the locality.
Gord
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Willison | 2003-09-10 17:26:30 | Re: how many records |
Previous Message | Bryan Irvine | 2003-09-10 15:35:22 | phone number list |