From: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> |
---|---|
To: | Andrés Repossi <andres(dot)repossi(at)c1(dot)pjn(dot)gov(dot)ar> |
Cc: | pgsql-admin(at)postgresql(dot)org |
Subject: | Re: About COPY |
Date: | 2003-02-25 15:09:50 |
Message-ID: | 1046185790.1015.365.camel@camel |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Tue, 2003-02-25 at 09:07, Andrés Repossi wrote:
> Hi, I'm new working with PostgreSQL, and I'm trying to load an ascii
> text file to a table using the command copy but it throws me an error
> message that it can't parse the line, and I don't really don't know why
> is this hapening.
>
> The sentence I'm using is:
>
> copy tfal from 'C:\\tfal.txt' with delimiter '|'
>
> Te error message is: ERROR: parser: parse error at or near "delimiter"
>
<snip>
>
> Does anyone had a trouble like this?, I don't understand what am I doing
> wrong. The version of the PGAdmin II I'm using is 1.4.12.
>
> Could anyone lend me a hand please, thanks,
>
I think the syntax your looking for is:
COPY tfal FROM '/tmp/foo' USING DELIMITERS '|';
At least that's how you'd do it in psql
Robert Treat
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Treat | 2003-02-25 15:22:17 | Re: postings appearing twice... |
Previous Message | Andrés Repossi | 2003-02-25 14:07:24 | About COPY |