Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Copy from : ERROR: date/time field value out of range



Bonjour

J'utilise Copy pour charger les données depuis un fichier plat dans une table dont voici la description :

Column | Type | Modifiers
-----------+-----------------------------+-----------
to_ref | bigint | not null
to_entity | character(40) | not null
to_date | timestamp without time zone | not null
to_time | timestamp without time zone | not null
to_occ | text |

La commande copy est la suivante :

copy toto from '/tmp/x.dat' delimiters '~'

dans mon fichier x.dat il y a les données suivants ( un million d'enregistrement ):
...
3454495~TQKQD ~12.03.2007 00:00:00~01.01.1900 17:35:26~
3454496~HHKKF ~12.03.2007 00:00:00~01.01.1900 17:35:34~
3454497~BBIIL ~12.03.2007 00:00:00~01.01.1900 17:35:39~
3454501~IKKFFS ~12.03.2007 00:00:00~01.01.1900 17:43:16~
3454502~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:44:33~
3454503~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:46:16~
3454504~ADJUSTMENT ~12.03.2007 00:00:00~01.01.1900 17:47:52~
3454517~TFFFR ~13.03.2007 00:00:00~01.01.1900 08:53:20~
...

L'erreur est la suivante :
ERROR: date/time field value out of range: "13.03.2007 00:00:00"
HINT: Perhaps you need a different "datestyle" setting.
CONTEXT: COPY toto, line 89846, column to_date: " 13.03.2007 00:00:00"

Pour info la ligne 89846 correspond a la dernière ligne de mes données.

Merci pour vos lumières



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group