Kindra Martinenko wrote:
<blockquote cite="mid:249550.32069.qm@web30207.mail.mud.yahoo.com"
type="cite">
<div
style="font-family: arial,helvetica,sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
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:
<font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">COPY
BaxterCommercial WITH OIDS FROM 'H:\...\BaxterCommercial.csv'
<font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">USING
DELIMITERS ',';
You need to escape the \ and maybe use the absolute path.
http://www.postgresql.org/docs/8.3/interactive/sql-copy.html
If you're using Windows try this but put the full path name instead of
... I use this frequently to load large files.
<font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">COPY
BaxterCommercial WITH OIDS FROM E'H:\\...\\BaxterCommercial.csv'
<font class="Apple-style-span"
face="'Courier New', courier, monaco, monospace, sans-serif">WITH CSV;
Bob