simple COPY FROM issue

From: "Kevin Duffy" <KD(at)wrinvestments(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: simple COPY FROM issue
Date: 2008-11-12 22:02:52
Message-ID: DFC309C8A42633419600522FA8C4AE1A5610D9@mail-01.wrcapital.corp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello All:

I am attempting to import data from a CSV file.

The command I am using is as follows:

copy imagineoptions from 'C:\\Options20081112.csv' DELIMITERS
',' CSV ;

I get the following:

WARNING: nonstandard use of \\ in a string literal

LINE 1: copy imagineoptions from 'C:\\Options20081112.csv'
DELIM...

^

HINT: Use the escape string syntax for backslashes, e.g., E'\\'.

ERROR: could not open file "C:\Options20081112.csv" for reading: No
such file or directory

SQL state: 58P01

If I run DIR at the command prompt I get:

C:\>dir C:\Options20081112.csv

Volume in drive C has no label.

Volume Serial Number is 1824-0333

Directory of C:\

11/12/2008 04:04 PM 1,300,220 Options20081112.csv

1 File(s) 1,300,220 bytes

0 Dir(s) 40,459,689,984 bytes free

C:\>

I have tried many variations of slashes and back-slashes, but nothing
works.

I am working within pgAdmin under Windows XP.

Please help me preserve my sanity. I do not see that I am doing wrong.

But I am certain it is very simple.

Best Regards

Kevin Duffy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message brian 2008-11-12 22:31:46 Re: simple COPY FROM issue
Previous Message Tom Lane 2008-11-12 21:32:55 Re: Using dblink to connect as non-superuser