Re: Error while importing CSV file

From: David Johnston <polobo(at)yahoo(dot)com>
To: Shadin_ <w_ward_w(at)hotmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Error while importing CSV file
Date: 2012-02-05 16:25:32
Message-ID: 5D1573DD-4DEA-4875-9F5F-34B56DD45B17@yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Feb 5, 2012, at 11:04, Shadin_ <w_ward_w(at)hotmail(dot)com> wrote:

>
> am new at dealing with PostgreSQL
> I was using PGAdmin and needed to export some data from a query I had run
> and then import it in another DB.
>
> *my columns names* : id (int4), name (varchar), time_starp(timestamp)
>
> so I followed these instructions
> http://www.question-defense.com/2010/10/15/how-to-export-from-pgadmin-export-pgadmin-data-to-csv
>
> till "Export Configuration window" , I had to choose the ";" coz the ","
> didn't separate the columns right in the csv file.
>
>
> but when I import this file to another postgreSQL DB by using:
> *COPY Table FROM '[insert .csv dir here]' USING DELIMITERS ',' CSV WITH
> HEADER*
>
> I got this error :
> *ERROR: invalid input syntax for integer: "id;name;timestamp"*
>
> am not sure whats wrong here
>
>
>

"id;name;timestamp"
...
USING DELIMITERS ','
...

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pat Heuvel 2012-02-05 17:24:54 vacuumlo fails pgsql ver 8.3
Previous Message Shadin_ 2012-02-05 16:04:16 Error while importing CSV file