Problems importing csv files

Поиск
Список
Период
Сортировка
От Kindra Martinenko
Тема Problems importing csv files
Дата
Msg-id 249550.32069.qm@web30207.mail.mud.yahoo.com
обсуждение исходный текст
Ответы Re: Problems importing csv files  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Problems importing csv files  (Robert Schnabel <schnabelr@missouri.edu>)
Список pgsql-novice
Hello,

I am having problems importing csv files into postgresql. I am hoping someone has had a similar problem and could help me troubleshoot.

I created a table that mimics the csv table I want to read from.  I set privleges to "All" and have been attempting to execute the following procedure:

COPY BaxterCommercial WITH OIDS FROM 'H:\...\BaxterCommercial.csv'
USING DELIMITERS ',';

However, I keep getting the following error:

WARNING:  nonstandard use of escape in a string literal
LINE 1: COPY BaxterCommercial WITH OIDS FROM 'H:\transpor\Traffic Co...
                                             ^
HINT:  Use the escape string syntax for escapes, e.g., E'\r\n'.
ERROR:  relation "baxtercommercial" does not exist

Obviously I am missing something, but I am not sure what it wants from me in terms of "escape string syntax"?  I tried putting an \r at the end as well as a '\r\n'

Example:  
COPY BaxterCommercial WITH OIDS FROM 'H:\...\BaxterCommercial.csv'
USING DELIMITERS ','
WITH NULL AS '\r\n';

Doing so resulted in the same error.

Thanks in advance for any help provided!

Kindra

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

Предыдущее
От: "Kevin Duffy"
Дата:
Сообщение: Re: level of recursion
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Problems importing csv files