Re: phone number list
Bryan Irvine <bryan.irvine@kingcountyjournal.com>
From: Bryan Irvine <bryan.irvine@kingcountyjournal.com>
To: Oliver Elphick <olly@lfix.co.uk>
Cc: pgsql-novice@postgresql.org
Date: 2003-09-10T19:31:04Z
Lists: pgsql-novice
> 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. I dropped the db and recreated the fields using varchar as Louise suggested. Here are the commands I'm using to create the tables: create table phonenumbers ( areacode varchar(3), prefix varchar(3), suffix varchar(4) ); And here's the insert commands: insert into phonenumbers values (425, 333, 4297); insert into phonenumbers values (425, 333, 4031); insert into phonenumbers values (425, 888, 3677); insert into phonenumbers values (425, 888, 4324); insert into phonenumbers values (425, 888, 0773); And here's the results of select: dncl=# select * from phonenumbers; areacode | prefix | suffix ----------+--------+-------- 425 | 333 | 4297 425 | 333 | 4031 425 | 888 | 3677 425 | 888 | 4324 425 | 888 | 773 Any ideas? Do I need to change the format of the fields again? --Bryan