pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Ivarsson <peter.ivarsson@onskefoto.se>
To: pgsql-admin@postgresql.org
Subject: Trying to copy data.
Date: Sat, 17 Sep 2005 00:47:26 +0200
Message-ID: <E1EGOzJ-0002mb-00@mailbox.tripnet.se> (raw)

I am trying to moving data from a DB2 database, but some rows has ^M in it.
I am changing the ^M to \r\n, but the \r\n  is invoked in the string instead of being functional.
 
The fields are separated with | and quotes with "
This since there could be , in the data, and I'm using 
 
copy schema.table FROM 'file.txt' DELIMITER as '|' NULL as 'NULL' CSV QUOTE as '"';
 
Any idea on how I should do to solve this?
 

Regards
Peter Ivarsson 

Message-ID: <E1EGOzJ-0002mb-00@mailbox.tripnet.se>
Permalink:  ../E1EGOzJ-0002mb-00@mailbox.tripnet.se/
Also on:    postgresql.org/message-id/E1EGOzJ-0002mb-00@mailbox.tripnet.se

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: peter.ivarsson@onskefoto.se
  Subject: Re: Trying to copy data.
  In-Reply-To: <E1EGOzJ-0002mb-00@mailbox.tripnet.se>
  References: <E1EGOzJ-0002mb-00@mailbox.tripnet.se>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox