Home » SQL & PL/SQL » SQL & PL/SQL » Read CLOB column (Oracle
Read CLOB column [message #572995] Wed, 19 December 2012 06:05 Go to next message
Messages: 9
Registered: December 2007
Location: Mumbai
Junior Member
I have two tables File_Master and File_Detail
File_Master Primary key FILE_ID
File_Detail Primary key FILE_ID,LINE_ID

I have a CLOB column FILE_CONTENT in table File_Master.
For every FILE_ID record in File_Master, several hundreds of lines are stored in the CLOB column.

I want to read this CLOB column 'File_Content' and and break every line (1000 Characters)
piecewise to populate columns of File_Detail.

Since there will be thousands of lines to process, what would be the best approach in writing PL/SQL code for better performance?

Thanks in advance.
Re: Read CLOB column [message #572996 is a reply to message #572995] Wed, 19 December 2012 06:12 Go to previous message
Michel Cadot
Messages: 65143
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
There is only one way: loop on every 1000 characters using SUBSTR.
(There are other ways but they require knowing how Oracle manages its memory and a couple of mathematical algorithms.)

Previous Topic: Replace Reapiting the Same Description with -DO-
Next Topic: Group by matching records
Goto Forum:

Current Time: Sat Aug 19 06:27:50 CDT 2017

Total time taken to generate the page: 0.06018 seconds