From: Lukasz S. <szy...@gm...> - 2007-11-23 20:36:25
|
Hello, mdb-schema databasename.mdb mysql FYI Trying to convert ftp://ftp.nhtsa.dot.gov/manufacture/manufacturer.mdb to mysql Few error I came across. 1. Your script is not checking from length. It created fields varchar(501) where in mysql limit is 255. 2. The 'drop table tablename' statement should be "drop table if exists tablename" 3. table names are not quoted. CREATE TABLE 565 should be CREATE TABLE `565` 4. Column names are not quoted. CREATE TABLE `565` ( MFG NAME varchar (255), should be CREATE TABLE `565` ( ` MFG NAME` varchar (255), This also applies to mdb-export while doing insert statement. 5. Not sure if you know this but there is no comma ',' at the end of each insert statement. which can be added using SED on a fly: mdb-export -I manufacturer.mdb WMI | sed -e 's/)$/)\;/' |mysql -u username -p database_name Other then that the program is great. Thanks for having it. I had to fix these things manually. It would be nice if that was done inside the software. Thanks a lot. Lucas |