I don't know. Somehow you will need to correlate the column names in the tables with the columns of the CSV file. Maybe the Syntax of the SQL Insert Statement can help you, assuming that the columns in the CSV file are in the same sequence as the column declarations in your database?
You will have to show a bit more code so we can see where your actual problem is. This site is not a script writing service where people write complete Perl scripts for you. We expect you to put some effort into researching the subject matter and presenting a first approach.
|