0

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

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by katerinaaa
0

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).

0

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

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.