Re: help with COPY from .csv file into database
От | michael@floog.net |
---|---|
Тема | Re: help with COPY from .csv file into database |
Дата | |
Msg-id | 1091636169.41110bc9b19f7@webmail.floog.net обсуждение исходный текст |
Ответ на | Re: help with COPY from .csv file into database (Oliver Elphick <olly@lfix.co.uk>) |
Ответы |
Re: help with COPY from .csv file into database
|
Список | pgsql-novice |
Hi Oliver, This time the copy command appeared to work, except for the "CFW" entry in the integer-formatted column, but then trying to view the data shows the long hyphenated line again and no readable data. What do you think is causing this? Thank you very much hanging in there with me on this issue. Mike TEST_DB=# copy matters (client_1_lastname, client_1_firstname, <<<snip>> TEST_DB(# case_type, billing_type, date_of_loss, judicial_district, date_open, TEST_DB(# date_close) from '/usr/local/postgres/TEST_DB.csv' DELIMITER ','; ERROR: invalid input syntax for integer: ""CFW"" CONTEXT: COPY matters, line 1, column matter_num: ""CFW"" TEST_DB=# select * from matters; client_1_lastname | client_1_firstname | client_1_address | client_1_phone | client_2_lastname | client_2_firstname | <<<snip>>> -------------------+--------------------+------------------+ ----------------+-------------------+--------------------+-- ----------------+----------------+--------------+-----------+ -----------+-------------+-------------+--------+------------ +------------+-----------+--------------------+-------------- -------+--------------------+---------------------+---------- ----------+---------------------+----------------------+----- ------------------+-----------+--------------+--------------+ -------------------+-----------+------------ (0 rows) TEST_DB=# Quoting Oliver Elphick <olly@lfix.co.uk>: > You had a previous line without a terminating semi-colon. Notice > that > the prompt (TEST_DB-# rather than TEST_DB=#) indicates that this is > a > continuation line. >
В списке pgsql-novice по дате отправления: