in reply to loading csv files into MySQL databse

Well I did something like what you are talking something like this: I had DBF table and then turn it into CSV and then load the data to MySQL. the code is something like this:
my $dbhX3 = DBI->connect('dbi:XBase(RaiseError=1):'); my $dbhC3 = DBI->connect('dbi:CSV(RaiseError=1):'); my $select3 = $dbhX3->prepare("SELECT * FROM r510"); print "\nEjecutar SELECT de r510\n"; $select3->execute(); $dbhC3->do("CREATE TABLE r510.csv AS IMPORT(?)",{},$select3); print "\nconectar al a base de datos en Mysql\n"; my $mysql_dbh3 = DBI->connect("DBI:mysql:database=$datafilename;host=l +ocalhost", "root", "xyz123", {'RaiseError' => 1}); #---- Here I empty the table in MySql ------ print "Limpiando la tabla\n"; $mysql_dbh3->do("TRUNCATE TABLE r510"); #---- Here I load all the data ------- my $sql3 = "LOAD DATA LOCAL INFILE 'c:/proyecto/r510.csv' INTO TABLE r510 FIELDS TERMINATED BY ',' LINES TERMINATED BY '\n'"; my $sth3 = $mysql_dbh3->prepare($sql3); print "ejecutando la carga de la tabla\n"; $sth3->execute ();
and the error message is that of having extra characters on the line O'Neil or O"Neil stuff like that check the CSV's