Re: Problem with Nested Inserts
I solved my problem. Saw on other forums this solution (for oracle):
update prod_suc ps set (cantidad, stockini, precio_may1, precio_may2) =
(select stock, stock, preciom, preciom2 from prod_cant pc where ps.cod_prod = pc.codigo);
That solution didn't work for me in MySQL, there seems to be a problem with grouping updates on MySQL, so I did it manually for each row:
UPDATE prod_suc ps
SET cantidad = (SELECT stock FROM prod_cant pc WHERE ps.cod_prod = pc.codigo)
and so on for the rest of the rows... There's another way, or IS there a TO DO for MySQL?
Subject
Views
Written By
Posted
6361
July 26, 2005 04:23PM
3503
July 26, 2005 06:59PM
3129
July 27, 2005 12:23PM
3796
July 27, 2005 01:21PM
Re: Problem with Nested Inserts
3395
July 27, 2005 02:11PM
3356
July 27, 2005 03:32PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.