Re: Problems importing csv files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kindra Martinenko <kindramart(at)yahoo(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Problems importing csv files
Date: 2009-06-22 20:10:05
Message-ID: 29667.1245701405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kindra Martinenko <kindramart(at)yahoo(dot)com> writes:
> 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 ',';

You need to double the backslashes, or perhaps replace them with forward
slashes. Read about string literal syntax here:
http://www.postgresql.org/docs/8.3/static/sql-syntax-lexical.html#SQL-SYNTAX-CONSTANTS

regards, tom lane

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Robert Schnabel 2009-06-22 20:15:57 Re: Problems importing csv files
Previous Message Kindra Martinenko 2009-06-22 20:05:16 Problems importing csv files