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

Home -> Community -> Usenet -> c.d.o.tools -> Concatenating Very Long Strings

Concatenating Very Long Strings

From: Chris Nelson <wrhs_71_at_yahoo.com>
Date: Mon, 11 Sep 2000 19:56:42 GMT
Message-ID: <8pjddd$5t1$1@nnrp1.deja.com>

Hi and thanks in advance.

I have written a query to extract tab-delimited column names and data from any table. This helps me to spool flat-file exports to disk, which I can later import into Access. All works well until I try to export a table with a lot of columns (over 230). The query concatenates the column names into a single string of tab-delimited text:

SELECT 'Column_1_Name' || CHR(9) ||

       'Column_2_Name' || CHR(9) ||
.
.
.

       'Column_n_Name'
FROM Dual
/

and on large tables produces the error message: ERROR:
ORA-01489: result of string concatenation is too long

Is there an environment variable or setting that I can modify to allow this long string to spool to a file? I have arraysize set to 1 and linesize set to its maximum 32767 in SQL*Plus 3.3.2.0.2, but this isn't helping me enough.

I appreciate your response!

Chris Nelson

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Mon Sep 11 2000 - 14:56:42 CDT

Original text of this message

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