This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes reading clob Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "reading clob " Watch "reading clob " New topic
Author

reading clob

pendse anagha
Ranch Hand

Joined: Mar 09, 2005
Posts: 44
Hello ,
I have a huge text file which contains the emails and city .
There would be thousands of such records in the file .

I have uploaded the file into Oracle into a clob .

Now I want to read the clob and do some procesing for each line
i.e . : email,city

I want to get each line from the clob .

Could someone kindly point me to an example
Also what are the best practices while reading from clob ?

Thanks in advance ,
-anagha
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32507
    
214

Anagha,
The easest way is to call getCharacterStream() on the Clob. That way you can deal with the result as a familiar reader object.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
 
Have you checked out Aspose?
 
subject: reading clob
 
It's not a secret anymore!