Re: Import German Number Format

Поиск
Список
Период
Сортировка
От A. Kretschmer
Тема Re: Import German Number Format
Дата
Msg-id 20081002135100.GG20230@a-kretschmer.de
обсуждение исходный текст
Ответ на Import German Number Format  ("Tim Semmelhaack" <semmelhaack@gmail.com>)
Список pgsql-general
am  Thu, dem 02.10.2008, um 15:35:44 +0200 mailte Tim Semmelhaack folgendes:
> Hello,
>
> I have to import a huge number of data sets of data sets with "Copy from".
>
> The numbers are formatted with decimal comma ',' (as usual in Germany)
> instead of the decimal point '.'
>
> When I try to import this data Postgres crashes, so I think I have to


PostgreSQL crashed? I disbelieve this, you got an error, right?


> change a parameter with SET? Does anybody know which parameter I have
> to change?

There isn't such a parameter. Change your data, change the ',' to '.'.
Or load the data into a temp. table as text and use build-in-functions to
convert this text to numeric and fill your destination table.

I would use sed or such tools.


Andreas
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA   http://wwwkeys.de.pgp.net

В списке pgsql-general по дате отправления:

Предыдущее
От: "Tim Semmelhaack"
Дата:
Сообщение: Import German Number Format
Следующее
От: "Jonah H. Harris"
Дата:
Сообщение: Re: Import German Number Format