Page 1 of 1

Update query which USED to work

Posted: Mon Nov 21, 2005 6:58 pm
by Stryks
This update query used to run fine but now it just gives an error.

Code: Select all

UPDATE 
   `tbl_vendor_product_price`, 
   `tbl_vendor_product` 
SET 
   `tbl_vendor_product_price`.`cost` = `tbl_vendor_product_price`.`cost` + '0.01' 
WHERE 
      `tbl_vendor_product`.`VI_PK` = `tbl_vendor_product_price`.`VI_ID` 
   AND 
      `tbl_vendor_product_price`.`VS_ID` = '32' 
   AND 
      `tbl_vendor_product`.`TT_ID` = '2'
I have been doing some updating, so it's not impossible that something is changed, but I can see what could be wrong.

Any help here would be great.

Jcart | formated query for readability

Posted: Mon Nov 21, 2005 7:00 pm
by John Cartwright
error is?

Posted: Mon Nov 21, 2005 7:02 pm
by Stryks
Ahh ... A server reload appears to have me saddled with mysql 3.23.58, and I'm pretty sure update joins arent allowed before 4.04.

Will update and see what happens.

Posted: Mon Nov 21, 2005 7:04 pm
by Stryks
Yeah ... the error would be helpfule eh? :roll:

You have an error in your SQL syntax near ' tbl_vendor_product SET `cost` = `cost` + '0.01' WHERE `tbl_vendor_product`.`VI_' at line 1

About to update though, so that may fix it.