in reply to csv2sql.pl

Some thoughts on various modules to do some/all of the work for you:

Could use DBD::CSV to read the source tables .. or use something like DBIx::Copy with it to do everything in one shot.

For the just-generate-the-sql method, SQL::Abstract is a handy module ..

It might also be possible w/DBD::AnyData to do it with a single cross-db SQL statement (not sure if they both need to by in-memory tables or not):
INSERT INTO db_table ( col1, col2, col3 ) SELECT colA, colB, colC FROM csv_table ;

Replies are listed 'Best First'.
Re^2: csv2sql.pl
by ciderpunx (Vicar) on Oct 20, 2006 at 13:11 UTC
    Thanks for taking the time to look at my code and suggest other ways to do it - much appreciated. It sounds like I could definitely make some improvements - I'll post in this node if I get round to it.

    Cheers