how to load a cvs file into a oracle 9i database using java
karthik sambandan
Greenhorn
Joined: Oct 11, 2006
Posts: 2
posted
0
hi All,
please help in loading a csv file into oracle 9i database using java and retrieve it back from the database into csv file.
cheers, karthik
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
Welcome to JavaRanch.
Are you asking about how to read/write CSV files, or how to to use JDBC to access a database? If the former, have a look at the various CSV-handling libraries listed here in the "Excel" category.
i am asking about the read/write of a csv file into a database.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
You can's save CSV file into a database directly, or read from a database directly into a CSV file. Do it in two steps: first read the file into memory (using one of the libraries mentioned in the page I linked to), and then add JDBC code to store the data in the database. Same for reading the data: first read it from the database, and then store it in a file.
Richard Thatch
Greenhorn
Joined: Feb 16, 2007
Posts: 12
posted
0
[ UD: Please don't post unrelated questions into an existing topic. That's called "hijacking" and generally frowned upon. Please start a new thread instead. ] [ March 20, 2008: Message edited by: Ulf Dittmer ]