• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

Read | delimitted text file and query database

I have a pipe(|) separated text file with many rows of data as in attachment. I need to read the text file and generate a query using first two values and query oracle database and see which records are not there in oracle database table( each row of the text field corresponds to each record in database).  I would like to treate whole text file as array object and individual rows as again small arrays with many values(could be string, numericals etc) separated by | symbol. Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
0
gudii9
Asked:
gudii9
2 Solutions
 
mrcoffee365Commented:
What code do you have so far?  This seems like something that you could do fairly easily, so I'm wondering if you have a specific question?
0
 
Jim CakalicSenior Developer/ArchitectCommented:
Here's one way of approaching the file reading problem (attached). There wasn't enough information in your question to address the database select but it should be easy to see where to put that in the context of the code. This should work with Java 1.4+

Regards,
Jim
Application.java
DelimitedReader.java
DelimitedWriter.java
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now