help with COPY query

From: Elinor Medezinski <elinor(at)bellatrix(dot)tau(dot)ac(dot)il>
To: pgsql-novice(at)postgresql(dot)org
Subject: help with COPY query
Date: 2004-02-24 14:28:27
Message-ID: 200402241628.28171.elinor@bellatrix.tau.ac.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi,
I want to load a file containning a column of FLOATS, into a table of
INTEGERs.

I tried:
COPY "Field" ("myintegers") from './myfloats.txt';
but got an error message:
ERROR: invalid input syntax for integer: "15.0"
CONTEXT: COPY Field, line 1, column WatchFreq: "15.0"
How can I go around this problem? is there any way to force copy to do the
right casting?

Thanks in advance,
Elinor

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2004-02-24 15:05:50 Re: current_query in pg_stat_activity
Previous Message Crombleholme, Roy 2004-02-24 11:02:13 Re: installing pgsql