Problems importing csv files - Mailing list pgsql-novice

From Kindra Martinenko
Subject Problems importing csv files
Date
Msg-id 249550.32069.qm@web30207.mail.mud.yahoo.com
Whole thread Raw
Responses Re: Problems importing csv files
Re: Problems importing csv files
List 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 by date:

Previous
From: "Kevin Duffy"
Date:
Subject: Re: level of recursion
Next
From: Tom Lane
Date:
Subject: Re: Problems importing csv files