Question about numeric

From: Erwin Ambrosch <ambre(at)ebutec(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Question about numeric
Date: 2002-05-22 11:27:47
Message-ID: 200205221032.g4MAWCL05840@email.ebutec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

when I import data from a text file (fildes are seperated with pipes) I get
an error for fields of type numeric if there are no data for this fields.

Example:

CREATE TABLE mytable (
id SERIAL,
num VARCHAR(32),
cost NUMERIC(6,2),
info TEXT
);

A line to import from a text file.

1|123abc||This part is....

Because of the empty field for the column cost, I get the following error:

ERROR: copy: line 1, Bad numeric input format ''
PQendcopy: resetting connection

This works (zero for the column cost):
1|123abc|0|This part is....

Thanks Erwin

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Jenkins 2002-05-22 12:14:05 Re: Update and Insert in a View Insert Rule
Previous Message ktt 2002-05-22 08:42:21 .doc .rtf database in PostgreSQL+PHP