It's not a secret anymore!
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
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "reading clob " Watch "reading clob " New topic

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 ,
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32614

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
I agree. Here's the link:
subject: reading clob
jQuery in Action, 3rd edition