CSV to MySQL database

Hi,

I have a CSV file with me and want to extract the information into a table in my MySQL database.

Can anyone guide me on how should i go about it ?

At present I have created 2 tables, first a "tablemaster" which keeps the tableid and tablename for all the tables in the database. Second is a "tablecolumninfo" which keeps details of all the columns of each table (pri key is the tableid + columnid)

How do i write something generic so that a csv file for any table can be extracted into the resp. table ?

[540 byte] By [arc_ga] at [2007-10-2 20:10:17]
# 1

If you imagine you have to write Java code for that then you are wrong. MySQL comes with a program that can import CSV data into a MySQL table. Here's the first entry that Google gave me for "mysql import csv":

http://dev.mysql.com/doc/refman/5.0/en/mysqlimport.html

(Search the page for "CSV")

DrClapa at 2007-7-13 22:50:51 > top of Java-index,Java Essentials,New To Java...
# 2
thanx for the reply. It check it out.
arc_ga at 2007-7-13 22:50:51 > top of Java-index,Java Essentials,New To Java...