problem with update using join

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • none

    #1

    problem with update using join

    I do not understand what is wrong with my query:

    mysql> update prices,prices_t mp set prices.new_ecam pus=prices_tmp. new
    where prices.isbn = prices_tmp.isbn ;

    ERROR 1064: You have an error in your SQL syntax near 'prices_tmp set
    prices.new_ecam pus=prices_tmp. new where prices.isbn = prices_tmp.' at
    line 1


    it seems to follow the sample code I have seen:

    mysql> UPDATE cds, artists
    -> SET cds.title = 'The Funkship Odyssey', artists.Artist = 'George
    Clinton'
    -> WHERE (artists.artist ID = cds.artistID) AND (cds.cdID = '2');
    Query OK, 2 rows affected (0.00 sec)
    Rows matched: 2 Changed: 2 Warnings: 0

  • Bill Karwin

    #2
    Re: problem with update using join

    "none" <dtiberio5@hotm ail.com> wrote in message
    news:1136535998 .808635.179530@ g47g2000cwa.goo glegroups.com.. .[color=blue]
    >I do not understand what is wrong with my query:
    >
    > mysql> update prices,prices_t mp set prices.new_ecam pus=prices_tmp. new
    > where prices.isbn = prices_tmp.isbn ;[/color]

    What version of MySQL are you using? Multi-table updates were implemented
    in MySQL 4.0.4, according to the documentation.

    http://dev.mysql.com/doc/refman/4.1/en/update.html

    Regards,
    Bill K.


    Comment

    • none

      #3
      Re: problem with update using join

      i discovered I am running an older version of mysql

      Comment

      Working...