Hello, all!
I have the daunting task of porting an Access database to MySQL. It's unbeliveably poorly designed, and columns id, name, issn, year, info, volume, numbers and remarks. I made another table, names, that's got columns id and name. I used INSERT INTO names (name) SELECT DISTINCT mag_table.name FROM mag_table to get, as one would expect, the distinct magazine names into the names- table. Now, what I'd want to do, is to replace the names in mag_table with the id-numbers from the names table, but I can't figure out how to do it. I tried UPDATE mag_table SET name=names.id WHERE name=names.name but MySQL tells me the following : ERROR 1109: Unknown table 'names' in where clause I haven't go perror to work at all, it just says Unknown error. Has anyone ever done anything like this, and, if so, how? I was thinking about a PHP-script, but if someone has got a query that would take care of this I wouldn't have to get into that. Cheers, Markus -- Markus Lervik Linux-administrator with a kungfoo grip Vaasa City Library - Regional Library [EMAIL PROTECTED] +358-6-325 3589 / +358-40-832 6709 -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]