COPY tablename FROM and null values

From: ivan marchesini <marchesini(at)unipg(dot)it>
To: pgsql-sql(at)postgresql(dot)org
Subject: COPY tablename FROM and null values
Date: 2006-03-22 11:18:51
Message-ID: 1143026331.4730.23.camel@geologia5.agora.ing.unipg.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Dear users,
I'm working on a Postgres 7.4 server

I have a .txt file, containing some tabular data, where data are
delimited by TABs.
there are 3 columns:

column1 int4, column2 float8, column3 float8

the problem is that column3 contains also null values (i.e. sometimes is
empty)

so when I try to use COPY tablename FROM 'filename.txt' I obtain an
error

I have tried also using " WITH NULL AS ' ' " but without good results...

can someone explain me how to solve this problem???

thank you very much

Ivan

--
Ivan Marchesini
Department of Civil and Environmental Engineering
University of Perugia
Via G. Duranti 93/a
06125
Perugia (Italy)
e-mail: marchesini(at)unipg(dot)it
ivan(dot)marchesini(at)gmail(dot)com
tel: +39(0)755853760
fax: +39(0)755853756
jabber: geoivan73(at)jabber(dot)org

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Luckys 2006-03-22 12:27:25 Re: COPY tablename FROM and null values
Previous Message Patrick JACQUOT 2006-03-22 09:01:23 Re: Referential integrity broken (8.0.3), sub-select help