Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: table creation from DBI handle info

by jZed (Prior)
on Mar 31, 2006 at 01:45 UTC ( #540337=note: print w/replies, xml ) Need Help??

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.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://540337]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2020-12-06 02:15 GMT
Find Nodes?
    Voting Booth?
    How often do you use taint mode?

    Results (65 votes). Check out past polls.