Text File to Java to Oracle

Thread Solved
Reply

Join Date: Nov 2008
Posts: 16
Reputation: ebiz is an unknown quantity at this point 
Solved Threads: 0
ebiz ebiz is offline Offline
Newbie Poster

Text File to Java to Oracle

 
0
  #1
Nov 20th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,525
Reputation: javaAddict is a glorious beacon of light javaAddict is a glorious beacon of light javaAddict is a glorious beacon of light javaAddict is a glorious beacon of light javaAddict is a glorious beacon of light javaAddict is a glorious beacon of light 
Solved Threads: 209
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Text File to Java to Oracle

 
0
  #2
Nov 20th, 2008
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.
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 33
Reputation: AlbertPi is an unknown quantity at this point 
Solved Threads: 2
AlbertPi AlbertPi is offline Offline
Light Poster

Re: Text File to Java to Oracle

 
0
  #3
Nov 20th, 2008
Originally Posted by ebiz View Post
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. :-) .
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 16
Reputation: ebiz is an unknown quantity at this point 
Solved Threads: 0
ebiz ebiz is offline Offline
Newbie Poster

Re: Text File to Java to Oracle

 
0
  #4
Nov 20th, 2008
thanks. i heard something about arrays, so i need to set the data from the text file as arrays, if so, how?
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 4,346
Reputation: Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of Ezzaral has much to be proud of 
Solved Threads: 498
Moderator
Featured Poster
Ezzaral's Avatar
Ezzaral Ezzaral is offline Offline
Industrious Poster

Re: Text File to Java to Oracle

 
0
  #5
Nov 20th, 2008
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC