in reply to table creation from DBI handle info

SQL::Translator will both find the ODBC table info and help to translate it into a CREATE statement suitable for MySQL. I think ODBC will let you make the dump to CSV directly, but if not, DBD::CSV will let you do that. You'll need at least two database handles in the script, one for ODBC and one for MySQL and a third for CSV if ODBC won't make the CSV table directly. You can also skip the CSV and just loop through the ODBC select doing a MySQL insert for each row. If you do use DBD::CSV, a single statement should createt the CSV file, something along the lines of "CREATE TABLE csv_table AS SELECT * FROM mysql_table".
  • Comment on Re: table creation from DBI handle info

Replies are listed 'Best First'.
Re^2: table creation from DBI handle info
by water (Deacon) on Mar 31, 2006 at 01:49 UTC
    Hurrah. Thanks. I love this place.