0

I currently have a table in oracle which I have created, but need to take a text file (which I have used a fileChooser for) and then use this file to update the records in the oracle database. How would I go about this?

Thanks.

4
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by Ezzaral
0

Read the file for its data.
Then use that data to query the database: Run an UPDATE to record you want to update.

Learn how to read files.
Learn SQL.
Learn how to run queries with java.

0

I currently have a table in oracle which I have created, but need to take a text file (which I have used a fileChooser for) and then use this file to update the records in the oracle database. How would I go about this?

Thanks.

You need a update statement to update your table in oracle. See below for "Update" syntax:
UPDATE table
SET column = expression
WHERE predicates;

Also you google to find "update", you will find a lot of examples. :-) :).

0

thanks. i heard something about arrays, so i need to set the data from the text file as arrays, if so, how?

0

Whether you use arrays, Lists, or whatever, the point is still the same. You'll need to read the file content into some structure and then use JDBC to update/insert your table values.

This question has already been answered. 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.