Skip site navigation (1) Skip section navigation (2)

Re: convert text file to database

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: e-letter <inpost(at)gmail(dot)com>
Cc: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: convert text file to database
Date: 2008-04-18 14:49:52
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
e-letter <inpost(at)gmail(dot)com> writes:
> I tried to import the csv file using the command:

> chessmatches=# COPY chessgames FROM '/absolute/path/filename.csv';
> ERROR:  invalid input syntax for integer: "Event..."

Umm ... you didn't tell it the data is in CSV.  I think you need at
least the HEADER option too.  See the COPY manual page:

			regards, tom lane

In response to

pgsql-novice by date

Next:From: Andrej Ricnik-BayDate: 2008-04-18 19:56:49
Subject: Re: Remote / network connection fails
Previous:From: e-letterDate: 2008-04-18 13:29:14
Subject: convert text file to database

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group