Re: Loading data from tab delimited file using COPY

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Jason Sheets <jsheets(at)idahoimageworks(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Loading data from tab delimited file using COPY
Date: 2004-12-11 03:46:31
Message-ID: 20041211034631.GA62930@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 08, 2004 at 09:17:12PM -0700, Jason Sheets wrote:

> Sample Data is available at http://www.idahoimageworks.com/sampledata.txt
>
> I'm using the command: COPY residential FROM 'file' WITH DELIMITER AS '\t';
>
> I'm receiving the error: ERROR: missing data for column "builder"
>
> When opened with excel as a tab delimited file all the fields are
> separated correctly, I know this e-mail is pretty long but I'm stumped.

Your sample data has 85 fields but the table has 87 fields, so COPY
complains. How many fields does Excel say the data has?

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message itamar 2004-12-11 03:54:09 ERROR: relation "table" does not exist - HELP
Previous Message Marc G. Fournier 2004-12-11 03:28:07 Re: Mailing List Problems?