List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 19 2003 12:48am
Subject:Re[2]: Newbie UPDATE error
View as plain text  
At 17:33 -0500 4/18/03, Peter Fleck wrote:
>Stefan,
>
>Thanks.
>
>+-----------+
>| VERSION() |
>+-----------+
>| 3.23.54   |
>+-----------+

Stefan's perfectly correct about the version you need.

However, the syntax correction suggested by another poster
is also needed.  Your original query named only one table before
the SET, and you need to name all the tables involved in the query
there.

>
>
>>Peter,
>>
>>>>try
>>>>UPDATE dates, grants SET dates.doe=grants.doe WHERE
>>>>dates.grantid=grants.grantid;
>>>>http://www.mysql.com/doc/en/UPDATE.html
>>
>>>  I did try that one and got a longer error message:
>>>  ERROR 1064: You have an error in your SQL syntax near ' grants SET
>>>  dates.doe=grants.doe WHERE dates.grantid=grants.grantid' at line 1
>>
>>For multi-tables updates, you need MySQL >= 4.0.4.
>
>
>--
>Peter Fleck
>Webmaster | University of Minnesota Cancer Center
>Dinnaken Office Bldg.
>925 Delaware St. SE
>Minneapolis, MN  55414
>612-625-8668 | fleck004@stripped | www.cancer.umn.edu
>Campus Mail: MMC 806


-- 
Paul DuBois
http://www.kitebird.com/
sql, query
Thread
Newbie date range selectVerdon Vaillancourt18 Apr
  • Re: Newbie date range selectPaul DuBois18 Apr
    • Re: Newbie date range selectVerdon Vaillancourt18 Apr
      • Newbie UPDATE errorPeter Fleck18 Apr
        • RE: Newbie UPDATE errorRoger Davis18 Apr
          • RE: Newbie UPDATE errorPeter Fleck18 Apr
          • Re: Re[2]: Newbie UPDATE errorMartin19 Apr
Re[2]: Newbie UPDATE errorStefan Hinz19 Apr
  • Re[2]: Newbie UPDATE errorPeter Fleck19 Apr
    • Re[2]: Newbie UPDATE errorPaul DuBois19 Apr