pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Huxton <dev@archonet.com>
To: Richard Sydney-Smith <richard@ibisaustralia.com>
To: pgsql-sql@postgresql.org
Subject: Re: Copy Command Error
Date: Mon, 15 Sep 2003 11:01:24 +0100
Message-ID: <200309151101.24985.dev@archonet.com> (raw)
In-Reply-To: <001601c37b67$608235e0$dd6d32d2@athlon2000>
References: <001601c37b67$608235e0$dd6d32d2@athlon2000>

On Monday 15 September 2003 09:57, Richard Sydney-Smith wrote:
> I am outputting the following rows from a SYBASE database on W2000

> The problem is that each string is imported with the inverted commas.
>
> eg field ID = ''RK'' instead of 'RK'
>
> Can someone please help?

A short bit of perl. Something like (untested)

perl -pi -e 's/\t"/\t/g' fcont.dat
perl -pi -e 's/"\t/\t/g' fcont.dat

That should pre-process the file. I'm sure someone else on the list will show 
how to do it in sed.

Hmm - just noticed you are on Windows. Not sure what cygwin ships with, or 
whether you have perl installed.
-- 
  Richard Huxton
  Archonet Ltd



view thread (2+ messages)

Message-ID: <200309151101.24985.dev@archonet.com>
Permalink:  ../200309151101.24985.dev@archonet.com/
Also on:    postgresql.org/message-id/200309151101.24985.dev@archonet.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@archonet.com, richard@ibisaustralia.com
  Subject: Re: Copy Command Error
  In-Reply-To: <200309151101.24985.dev@archonet.com>

* 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