Hi folks,
I'm having a problem importing a database. Please don't comment on the design, I didn't do it and I can't change it, I'm just trying to import it.
Normally I would use:
The problem I'm having is that some wonderful person has decided to use a text field as the key in a table. This means I have values like '4000' and '4000 ' (note the end space). It appears they were also too stupid to trim the data before the insert.
Anyways MySQL seems to trim these fields when it does an insert so it's causing duplicate fields.
Has anyone run into this before? I've tried on 5.2 on Win 7 and 5.0 on Debian 5. I'm about to try installing MySQL 4 as it's a MySQL 4 database.
Any help greatly appreciated
Paul.
I'm having a problem importing a database. Please don't comment on the design, I didn't do it and I can't change it, I'm just trying to import it.
Normally I would use:
Code:
mysql -u xxxx -p -D databaseName < db.sql
The problem I'm having is that some wonderful person has decided to use a text field as the key in a table. This means I have values like '4000' and '4000 ' (note the end space). It appears they were also too stupid to trim the data before the insert.
Anyways MySQL seems to trim these fields when it does an insert so it's causing duplicate fields.
Has anyone run into this before? I've tried on 5.2 on Win 7 and 5.0 on Debian 5. I'm about to try installing MySQL 4 as it's a MySQL 4 database.
Any help greatly appreciated

Paul.