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

Home -> Community -> Usenet -> c.d.o.misc -> How to turn a column of data into a very long comma delimited string?

How to turn a column of data into a very long comma delimited string?

From: Allen Gibbons <agibbons_at_ec.rr.com>
Date: Mon, 03 Mar 2003 04:20:19 GMT
Message-ID: <7KA8a.8309$ki.581199@twister.southeast.rr.com>


I'm trying to take data in a single column, say 20000 records of about 10 characters each
and output them to a .CSV file.

I have a cursor which loops through the records makes v_string longer each time.
v_string is declared as varchar2(32767)

v_string := v_string||' '||v_string;

This works for a small number of records, but falls down when I hit the large number of records.

Is there a way around this problem?

I've been looking into the LONG data type but I'm having trouble concatenating the values and getting them into a variable of this type.

Any ideas would be much appreciated.

AEG Basically, my goal is a CSV file in the following format:

column_1,value1,value2,value3, etc.
column_2,value1,value2,value3, etc.
etc.
(for all columns in the database)

And some of the CSV rows will be very long (possibly 160000 characters long) Received on Sun Mar 02 2003 - 22:20:19 CST

Original text of this message

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