Greetings, I am currently working on a table that has a column called state and a column called stateid. All 42,000 records in this table have a 2 Letter abbreviation for that state (NY, CA, NV, etc) however. To eliminate redundancy, I have move the states to another table that contains an AUTO_INCREMENT field, the state abbr and the state name. A typical record looks like this 1,"NY","New York"
I want to remove the "city.state" column from the and populate the "city.stateid" with values from "state.id" Does anyone have any ideas on how to build an UPDATE statement that will SELECT id FROM state WHERE state = city.state? Many Thanks SK mysql, query --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php