Quote:
Originally posted by bignogin
I dont want you to do the work for me. I just was in a jam. Im not very good at the Mysql stuff.
Ive tried some update statemnts like this
update A set A.price = B.Price where A.sku = B.sku ;
Bu tthat does not work. So i thought I would ask.
|
Lots of times people ask for work/homework/classwork to be done for them on boards. Folks don't mind helping out, but don't want to be doing everything, that's why i mentioned it.
You can do
UPDATE a, b
SET a.price = b.price
WHERE
a.sku = b.sku
AND
b.sku is not null;
This works if you have MySQL 4.0.4 or later.
You have to denote the second table in the update, whereas you have only included table A in yours that might have generated the error.
Previous to version 4.0.4 you can't update across multiple tables like this.