Hi,
I want to save a .txt file into database using java language, how can it is possible ?

The .txt file has one word per line and I would like when the program find a string like "<P>" to continue until line with "</P>". If it is found to increase a counter .

Any ideas?

Thank you

Hi,
I want to save a .txt file into database using java language, how can it is possible ?

You can save it as a String (VARCHAR) or CLOB. That depends on what you want to store.

The .txt file has one word per line and I would like when the program find a string like "<P>" to continue until line with "</P>". If it is found to increase a counter .

That's got nothing to do with saving the data or the file. You could make use of a HTML parser or a regex (if there is an obvious pattern to it).

Actually I want to make some searches and for this reason and because of file length I think that is better to save text into database.

Searches like find the 10th, 100th word of text.
Which word appears more times...
Which two words appears more times in text . ..
etc

But I don't know how could it be better...

Do you think that I have to save the text like string?
Are there any sites for this or a little more help.

Thanking you in advance

Actually I want to make some searches and for this reason and because of file length I think that is better to save text into database.

Searches like find the 10th, 100th word of text.
Which word appears more times...
Which two words appears more times in text . ..
etc

But I don't know how could it be better...

Do you think that I have to save the text like string?
Are there any sites for this or a little more help.

Thanking you in advance

I think it's better to save every paragraph as a different insert in a table.

This article has been dead for over six months. Start a new discussion instead.