Re: odbc parameters - Mailing list pgsql-general

From A. Kretschmer
Subject Re: odbc parameters
Date
Msg-id 20070711134638.GC20014@a-kretschmer.de
Whole thread Raw
In response to Re: odbc parameters  ("Zlatko Matic" <zlatko.matic1@sb.t-com.hr>)
List pgsql-general
am  Wed, dem 11.07.2007, um 14:55:28 +0200 mailte Zlatko Matic folgendes:
> I have already tried COPY.
> But, it has problems with type castings.
> For example, COPY operation fails because PostgreSQL can't copy value
> 7.844,000 into NUMERIC field...

Either copy such values into a temp. table with text-columns and work
with arbitrary sql-funktions (you can convert it to numeric with, for
instance, regexp_replace('7.844,000',',.*$', '')::numeric) to fill the
destination table with the values or work before the COPY with
text-lools like sed, awk, perl, ...


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

pgsql-general by date:

Previous
From: "Zlatko Matic"
Date:
Subject: Re: odbc parameters
Next
From: Peter Wiersig
Date:
Subject: Re: Strange round behaviour w/ more than 2 decimals