Re: text file import

From: Richard Huxton <dev(at)archonet(dot)com>
To: Bart van den Eijnden <BEN(at)Syncera-ITSolutions(dot)NL>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: text file import
Date: 2005-10-06 15:14:32
Message-ID: 43453F58.9030804@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Bart van den Eijnden wrote:
> Hi list,
>
> I am trying to transfer the following from MySQL to PostgreSQL:
>
> load data local
> infile 'D:/tmp/InterAcces- MySQL/03102005/bedrijven.txt'
> into table bedrijven
> fields terminated by ',' optionally enclosed by '^'
> lines terminated by ';\r\n';
>
> Is there a way to do this without changing the file (this file is delivered by a 3rd party)? Btw, I am on the win32 platform.

Normally, I'd pipe it through a Perl filter into a COPY FROM STDIN
command. Not sure what you'll have installed on Windows.

Oh - and you might need to correct some of the data if MySQL isn't being
strict enough.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2005-10-06 15:30:26 Re: PostgreSQL 8.1 vs. MySQL 5.0?
Previous Message Scott Marlowe 2005-10-06 15:10:14 Re: PostgreSQL 8.1 vs. MySQL 5.0?