There is no from clause in the update syntax. However, I'm not sure how
you would update a tablethe way you are trying to. I'm sure it can be done, and your 
SQL looks
correct besides the fromclause. Just take that out and see if what it says.

-Nick

> hi.  i'm new to the list and

have only been playing with mySQL for a
> few weeks now, i have a question regrading the

syntax of an UPDATE
> statement - i hope nobody minds me asking.
>
> i want to uopdate a

table with the data from another, i've written the
> following:
>
> update trackinfo

SET trackinfo.postcode = newtrackinfo.postcode FROM
> trackinfo, newtrackinfo
WHERE
trackinfo.telephone =
> newtrackinfo.telephone;
>
> it should update
trackinfo
with the postcodes from newtrackinfo, as
> long as the telephone numbers
match - but i get an
errror - it
> complains about the 'FROM...' onwards.
>
> am i missign
something
simple?
>
> cheers,
>
> .ben
>
>
> ---------------------------------------------------------------------
> 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 <mysql-
[EMAIL PROTECTED]>
To
> unsubscribe, e-mail
> <mysql-unsubscribe-
[EMAIL PROTECTED]>
Trouble
> unsubscribing? Try:
http://lists.mysql.com/php/unsubscribe.php




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