Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> How to turn a column of data into a very long comma delimited string?
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
![]() |
![]() |