List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:March 12 2003 11:51pm
Subject:Re: UPDATE syntax help
View as plain text  
At 9:45 +1000 3/13/03, JJ wrote:
>That explains it then.... D'OH
>Is there a workaround?
>Thanks :-)

One way is to use a script that issues a join to figure out which
records to update, then constructs the appropriate UPDATE statements.

>
>----- Original Message -----
>From: "Paul DuBois" <paul@stripped>
>To: "MySQL" <MySQL@stripped>; "MySQL" <mysql@stripped>
>Sent: Thursday, March 13, 2003 9:02 AM
>Subject: Re: UPDATE syntax help
>
>
>>  At 8:33 +1000 3/13/03, MySQL wrote:
>>  >Hi all,  I am having a little UPDATE syntax issue.  According to the
>manual
>>
>>  According to the manual, this won't work until MySQL 4.x
>>
>>  >
>>  >UPDATE EBA_USERS, IMPORT_USERS
>>  >SET EBA_USERS.HUB_ID = IMPORT_USERS.HUB_ID,
>>  >EBA_USERS.REP_LOCATION_ID = IMPORT_USERS.REP_LOCATION_ID,
>>  >EBA_USERS.REP_FIRST_NAME = IMPORT_USERS.REP_FIRST_NAME,
>>  >EBA_USERS.REP_LAST_NAME = IMPORT_USERS.REP_LAST_NAME,
>>  >EBA_USERS.REP_DISABLED = IMPORT_USERS.REP_DISABLED
>>  >WHERE EBA_USERS.REP_ID = IMPORT_USERS.REP_ID
>>  >
>>  >should work (as I understand it ;-)  but I get the error
>>  >
>>  >ERROR 1064: You have an error in your SQL syntax near ' IMPORT_USERS
>>  >SET EBA_USERS.HUB_ID = IIMPORT_USERS.HUB_ID, EBA_USERS.REP_LOCATION_ID =
>>  >IMPO' at line 1
>>  >
>>  >I did note in the comments section at the bottom someone else with
>>  >same/similar problem, but have been unable to find a thread in the mail
>>  >archive.  My apologies if this has been dealt with already, or a
>workaround
>>  >suggested...
>>  >
>>  >MySQL 3.23.51-nt on a Win2K box
>>  >MyODBC 3.51
>>  >
>>  >Thanks
>>  >
>>  >Jeff Creed
>>  >Throbware
>>  >
>>  >(0417) 797 592
>  > >http://www.throbware.com.au

Thread
UPDATE syntax helpMySQL12 Mar
  • Re: UPDATE syntax helpPaul DuBois13 Mar
  • Re: UPDATE syntax helpJJ13 Mar
    • Re: UPDATE syntax helpPaul DuBois13 Mar
    • RE: UPDATE syntax helpAndy Eastham13 Mar
      • Re: UPDATE syntax helpJJ13 Mar
  • RE: UPDATE syntax helpstu@home23 Mar
    • RE: UPDATE syntax helpDoug Thompson24 Mar
  • RE: UPDATE syntax helpstu@home23 Mar
  • RE: UPDATE syntax helpstu@home23 Mar