I
I & L Fogg
I am trying to copy data from a proprietary ("semi"-relational) database
to MySQL. Fortunately, the db vendor provides an ODBC driver, so getting
the db schema and data is fairly straighforward using DBI and DBD::ODBC.
I am encountering one problem that someone may be able to help me with.
One of the tables in the db has several non-unique columns that are not
actually used (there are 10-15 columns named "Unused").
When I pull the table def using column_info, I can easily filter these
out before creating an appropriate table definition in MySQL.
The problem is that when I try to extract the data, the DBD::ODBC driver
barfs complaining about the non-unique columns (Unused). This happens
even when I specifically exclude Unused from the SELECT clause. IWO, I
use SELECT col_a, col_b FROM table; - not SELECT * FROM table;.
Can anyone suggest a workaround to this problem? I have suggested to my
client that we might need to modify the DB definition to fix the column
names for these Unused columns, but it would be nice if I could load the
data from the other columns without needing to do this.
Cheers, Iain
to MySQL. Fortunately, the db vendor provides an ODBC driver, so getting
the db schema and data is fairly straighforward using DBI and DBD::ODBC.
I am encountering one problem that someone may be able to help me with.
One of the tables in the db has several non-unique columns that are not
actually used (there are 10-15 columns named "Unused").
When I pull the table def using column_info, I can easily filter these
out before creating an appropriate table definition in MySQL.
The problem is that when I try to extract the data, the DBD::ODBC driver
barfs complaining about the non-unique columns (Unused). This happens
even when I specifically exclude Unused from the SELECT clause. IWO, I
use SELECT col_a, col_b FROM table; - not SELECT * FROM table;.
Can anyone suggest a workaround to this problem? I have suggested to my
client that we might need to modify the DB definition to fix the column
names for these Unused columns, but it would be nice if I could load the
data from the other columns without needing to do this.
Cheers, Iain