Re: When spooling a table to a delimited text file, how do I strip the delimiting character from the data itself?

From: GHouck <hksys_at_teleport.com>
Date: Sun, 28 Jan 2001 14:01:43 -0800
Message-ID: <3A7496C7.7A36_at_teleport.com>


Jim Cheoros wrote:
>
> Using SQLPlus, I'm trying to export some tables into ASCII delimited files from Oracle 8.0. I don't have any problems doing this, except the data itself contains the character I'm using to delimit the columns with - so some individual fields in the output file wind up appearing as several.
>
> Does anybody have any ideas on how to get around this? Unfortunately, the data contains tabs, pipes, double & single quotes, asterisks, #, $, etc, so I can't just use those as delimiters ...
>
> Thanks!
>
> Jim Cheoros
> --
> Advanced Downloading Ltd
> Tel: +44 (0)20 8789 5000
> http://www.dataconversion.co.uk

Pick some character (ASCII=x) you DON'T expect, so you can enclose the strings with it:

  select CHR(x)||strvalue0||CHR(x)||strvalue1||CHR(x)|| ...

Yours,

Geoff Houck
systems hk
hksys_at_teleport.com
http://www.teleport.com/~hksys Received on Sun Jan 28 2001 - 23:01:43 CET

Original text of this message