Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Converting oracle table's data into csv on client computer

Re: Converting oracle table's data into csv on client computer

From: Paul <paul_at_see.my.sig.com>
Date: Sun, 24 Jul 2005 11:55:26 +0100
Message-ID: <vms6e19lb7r4b6ra9qe2j4sbn2aukrahcv@4ax.com>

Jaap W. van Dijk <j.w.vandijk.removethis_at_hetnet.nl> wrote:

>Assuming the delimiter is a comma, I use
> set colsep ,
>then spool
> SELECT * ...
> and then remove the spaces in the spoolfile around the commas with the
>Unix command
> sed "s/ *, */g" spoolfile > file2

But suppose that your original text in the Oracle table already contains commas? I think that's the problem.

If I were to choose something like your solution, I would choose pipe, rather than comma, but you can never guarantee that some wierdo hasn't stuck a pipe character someplace. You'd have to check your data first with a
SELECT * FROM Blahtable where field1 like '%|%' or field2 like .......

You'd be there all day. Your solution is not very generic.

Paul...

>Jaap.

-- 

plinehan __at__ yahoo __dot__ __com__

XP Pro, SP 2, 

Oracle, 9.2.0.1.0 (Enterprise Ed.)
Interbase 6.0.1.0;

When asking database related questions, please give other posters 
some clues, like operating system, version of db being used and DDL.
The exact text and/or number of error messages is useful (!= "it didn't work!").
Thanks.
 
Furthermore, as a courtesy to those who spend 
time analysing and attempting to help, please 
do not top post.
Received on Sun Jul 24 2005 - 05:55:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US