error in copy table from file

error in copy table from file

Post by mzmaxm.. » Fri, 13 Dec 2002 02:40:54



hi=0D
i'm using postgreSQL 7.3 b1.=0D
when i try to populate my tables with the files that contain all the =0D
data, i have some troblues:=0D
for example, my table has the following fields:=0D
-date (date)=0D
-id_street (int2)=0D
-flux_h_0_1 (float8)=0D
-flux_h_1_2 (float8)=0D
.=0D
.=0D
.=0D
-flux_h_23_0 (float8)=0D
=0D
the input file has semicolon as delimiters=0D
and it't like this=0D
2000-01-01;25;325.236;-0.123; and so on ;1.2=0D
2000-01-01;26;323.45;-1.23;             1.66=0D
=0D
if i execute the command=0D
=0D
copy table from 'path/file' using delimiters ';'=0D
it returns the following:=0D
=0D
'RROR:  copy: line 1, Bad float8 input format '-0.123=0D
=0D
i can't understand why it's saying it's wrong!!!!=0D
or another error in importing other tables can be:=0D
=0D
": can't parse "ne 1, pg_atoi: error in "125=0D
=0D
and 125 is the last number of a row.=0D
=0D
what can i do to solve this problem?=0D
thanx in advance for your help=0D
=0D
massimo=0D

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command

 
 
 

error in copy table from file

Post by Stephan Sza » Fri, 13 Dec 2002 03:21:02



> 'RROR:  copy: line 1, Bad float8 input format '-0.123

Looks like you have end of line issues (given the fact that the
second quote is at the beginning of the line.  You
probably have carriage returns at the end of lines.
If you get rid of those, it probably will work.

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

 
 
 

error in copy table from file

Post by Manfred Koiz » Fri, 13 Dec 2002 03:59:14




>copy table from 'path/file' using delimiters ';'

>it returns the following:

>'RROR:  copy: line 1, Bad float8 input format '-0.123

 ^
This belongs to the end of the error message.  Finding it here at the
beginning of the line makes me think your file has DOS style end of
lines (CR/LF).  Convert them to Unix style (LF only).

Servus
 Manfred

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org