This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes XML, flat files to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "XML, flat files to database" Watch "XML, flat files to database" New topic

XML, flat files to database

Dushy Inguva
Ranch Hand

Joined: Jun 24, 2003
Posts: 264
Hi all,
I am trying to insert from a CSV file, a tabbed file and if possible an xml file into the database.
The solution has to be java only and independent of the database (we are porting from sqlserver to db2). So, are there any free java based utilities which insert the given flat file's data into the database?
I searched and was surprised to find therez no obvious free ones. This is quite common requirement right?

jimmy coyne

Joined: Feb 01, 2002
Posts: 8
Could you insert it as a clob ?
Joe Ess

Joined: Oct 29, 2001
Posts: 8836

If you happen to be using MS SQL Server, it has a utility called Data Transformation Services. Great tool for doing what you describe.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
Convert the file to either blob or clob and store it to the table
I agree. Here's the link:
subject: XML, flat files to database
Similar Threads
JDBC with flat file
Finding matching column name
Problem facing with FlatFIle adapter in websphere integration developer7.0
Websphere and inbound flat files?
Web Service XML