Search Postgresql Archives

Re: Newbie "Copy From" not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 17, 2006 at 03:27:26PM -0400, Walter Vaughan wrote:
> Admin_=# COPY DATA_IMPORT_CUSTOMER FROM '/tmp/sold.pg' delimiter '|' null 
> '';
> ERROR:  missing data for column "processed_timestamp"
> CONTEXT:  COPY data_import_customer, line 1: "(xxx) xxx-xxxx||Mary|Smith|76 
> Crest Street||Jersey City|NJ|07302-0000|New Jersey|USA||XXX|XXX-1..."

The table you posted has 42 columns; at least one line in the file
doesn't have that many fields.  Here's an easy way to count the
number of fields on each line in the file:

awk -F'|' '{print NR, NF}' /tmp/sold.pg

Suggestion: fix the file so each line has the same number of fields
as the table has columns.

-- 
Michael Fuhr


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux