*
The moose likes JDBC 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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29219
    
135

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: reading clob
 
Similar Threads
how to detect end of line
clob.setCharacterStream(1); Unsupported feature
String -> MySQL CLOB
effcient way to parse clob data
HL7 HAPI 1.0 Parser