Re: COPY tablename FROM and null values

Поиск
Список
Период
Сортировка
От Luckys
Тема Re: COPY tablename FROM and null values
Дата
Msg-id b80d582c0603220427t356241bmae03ee7a042418a6@mail.gmail.com
обсуждение исходный текст
Ответ на Re: COPY tablename FROM and null values  (Achilleus Mantzios <achill@matrix.gatewaynet.com>)
Ответы Re: COPY tablename FROM and null values  (JSP <jason.palivino@gmail.com>)
Список pgsql-sql


On 3/22/06, Achilleus Mantzios <achill@matrix.gatewaynet.com> wrote:
O ivan marchesini έγραψε στις Mar 22, 2006 :

> 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???

batch edit your file (with sed,awk,perl,C,java,...) and build your
explicit INSERT statements in some version of your file.
 
or Replace the empty spaces in the file with some other value (0.0)

>
> thank you very much
>
> Ivan
>
>
>
>
>

--
-Achilleus


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

В списке pgsql-sql по дате отправления:

Предыдущее
От: Achilleus Mantzios
Дата:
Сообщение: Re: COPY tablename FROM and null values
Следующее
От: JSP
Дата:
Сообщение: Re: COPY tablename FROM and null values