[snip]
update trackinfo SET trackinfo.postcode = newtrackinfo.postcode FROM
trackinfo, newtrackinfo WHERE trackinfo.telephone = newtrackinfo.telephone;
[/snip]

http://www.mysql.com/doc/U/P/UPDATE.html
MySQL does not support sub-queries, such as the one you are attempting here.
(the "FROM" on..) You could try INSERT...SELECT
http://www.mysql.com/doc/I/N/INSERT_SELECT.html
or REPLACE...SELECT
http://www.mysql.com/doc/R/E/REPLACE.html

The REPLACE is probably what you're looking for, but be careful, "REPLACE
works exactly like INSERT, except that if an old record in the table has the
same value as a new record on a unique index, the old record is deleted
before the new record is inserted. "

HTH!

Jay

"We are all apparently 'net' literate, why don't we use it to get the
information we need? After all, isn't that what a Google search is all
about?"



---------------------------------------------------------------------
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

Reply via email to