Re: help with COPY from .csv file into database - Mailing list pgsql-novice

From Oliver Elphick
Subject Re: help with COPY from .csv file into database
Date
Msg-id 1091635046.31602.2955.camel@linda
Whole thread Raw
In response to Re: help with COPY from .csv file into database  (michael@floog.net)
Responses Re: help with COPY from .csv file into database
List pgsql-novice
On Wed, 2004-08-04 at 15:40, michael@floog.net wrote:
> I have tried to COPY the contents of the .csv file into my database
> called TEST_DB, but I'm still doing something incorrectly.  Currently,
> database TEST_DB has one table called "matters".
>
> In my attempts listed below, I specified the name of each column/field
> in my database and specified the delimiter used in the .csv file, but
> still no go:
>
> TEST_DB-# copy matters (client_1_lastname, client_1_firstname,
...
> date_close) from '/home/floog/TEST_DB.csv' DELIMITER ',';
>
> ERROR:  syntax error at or near "client_1_lastname" at character 2
...
>
> What did I do incorrectly?

You had a previous line without a terminating semi-colon.  Notice that
the prompt (TEST_DB-# rather than TEST_DB=#) indicates that this is a
continuation line.

--
Oliver Elphick                                          olly@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
GPG: 1024D/A54310EA  92C8 39E7 280E 3631 3F0E  1EC0 5664 7A2F A543 10EA
                 ========================================
     "And not only so, but we glory in tribulations also;
      knowing that tribulation worketh patience; And
      patience, experience; and experience, hope."
                                        Romans 5:3,4


pgsql-novice by date:

Previous
From: Oliver Elphick
Date:
Subject: Re: help with COPY from .csv file into database
Next
From: michael@floog.net
Date:
Subject: Re: help with COPY from .csv file into database