in reply to Re: Insert using CSV
in thread [SOLVED]Insert using CSV

Thank you. Since the script that i am developing ahould be able to populate any tables using CSV files. Since tables will not have same column name and number of columns, how i achieve the script to support different tables.

Replies are listed 'Best First'.
Re^3: Insert using CSV
by Corion (Patriarch) on Nov 03, 2009 at 10:34 UTC

    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.

      Thanks for your help. I solved it....