Home » SQL & PL/SQL » Client Tools » HOW TO SPOOL CLOB DATA INTO FLAT FILE
icon5.gif  HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526512] Tue, 11 October 2011 05:58 Go to next message
manojbe09
Messages: 16
Registered: October 2011
Location: MUMBAI
Junior Member
Pl help i want to spool CLOB data into flat file...
how to do it..
Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526515 is a reply to message #526512] Tue, 11 October 2011 06:29 Go to previous messageGo to next message
Michel Cadot
Messages: 65388
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Using SELECT?

Regards
Michel
Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526604 is a reply to message #526515] Tue, 11 October 2011 19:33 Go to previous messageGo to next message
Barbara Boehmer
Messages: 8805
Registered: November 2002
Location: California, USA
Senior Member
More specifically:

spool file_name.txt
select clob_column
from table_containing_clob;
spool off

Then the contents of the clob_column will be in the file file_name.txt.
Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526623 is a reply to message #526604] Wed, 12 October 2011 01:02 Go to previous messageGo to next message
manojbe09
Messages: 16
Registered: October 2011
Location: MUMBAI
Junior Member
I tried this but data is not coming in sigle line, it is splitted across multiple lines..can i spool it in excel..??
Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526626 is a reply to message #526623] Wed, 12 October 2011 01:23 Go to previous messageGo to next message
Michel Cadot
Messages: 65388
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
set linesize 32767 long 32767 longchunksize 32767 trimout on trimspool on


Of course if your CVLOB is larger than 32K then you can't get it in a single line.

can i spool it in excel..?? 

Not more but you can pull it from Excel using VBA and ODBC (for instance).

Regards
Michel

[Edit: missing letter]

[Updated on: Wed, 12 October 2011 01:53]

Report message to a moderator

icon14.gif  Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526628 is a reply to message #526626] Wed, 12 October 2011 01:41 Go to previous messageGo to next message
manojbe09
Messages: 16
Registered: October 2011
Location: MUMBAI
Junior Member
Thanks a lot for reply...This solved my problem..Thank u once again.. Smile
Re: HOW TO SPOOL CLOB DATA INTO FLAT FILE [message #526630 is a reply to message #526628] Wed, 12 October 2011 02:07 Go to previous message
sprasad88
Messages: 1
Registered: October 2011
Location: navi mumbai
Junior Member
Thanks a ton
Previous Topic: a few questions and saving a database to a file
Next Topic: how to install oracle developer suit 10g on window 7 32 bit
Goto Forum:
  


Current Time: Fri Feb 23 08:06:44 CST 2018

Total time taken to generate the page: 0.01694 seconds