Re: phone number list

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
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:34:57
Message-ID: 1063215297.5248.125.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Wed, 2003-09-10 at 16:35, 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?

It sounds as though you are storing the numbers in numeric fields, in
which case store them in text fields instead.

But you need to give much better information if you seriously want
assistance. That is, you need to show us the table structure and the
commands by which you insert a row in that table.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight, UK http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C
========================================
"Draw near to God and he will draw near to you.
Cleanse your hands, you sinners; and purify your
hearts, you double minded." James 4:8

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Oliver Elphick 2003-09-10 17:35:28 Re: how many records
Previous Message Louise Cofield 2003-09-10 17:27:27 Re: how many records