Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

help for query to csv with very large clob

user4160101Feb 6 2024

Hi,

I'm still on 11g :(((

i have a table with a clob with almost 2 millions of characters.

I have a query like this to spool on csv file

set colsep ';'
set lines 9999
set head on
set pages 0
set feed off
set trimspool on
spool TEMPTABLE.csv

select 'SOMEVALUES' from dual union all select COD_FISC from TEMPTABLE;

SOMEVALUES is the clob

obviously dbms_lob.substr() does not work because it can read “only” 32767 chars.

Is there a easy solution?

Thank you very much

Comments
Post Details
Added on Feb 6 2024
8 comments
148 views