Re: Update con select nel where
La tua query non funziona perchè la subquery restituisce una colonna di id_prodotto e non un solo record.
Per far funzionare la tua query e aggiornare tutti i prodotti di una determinata categoria ti basta usare IN invece dell'uguale, in questo modo:
UPDATE tab_listiniprodotti SET listino3 = 1.5*listino3 WHERE id_prodotto IN (SELECT id_prodotto FROM tab_prodotti WHERE cat_prod = 'id_categoria_interessata')
Subject
Views
Written By
Posted
36595
October 19, 2007 02:58PM
Re: Update con select nel where
12487
October 19, 2007 03:30PM
8293
October 19, 2007 03:34PM
7455
January 02, 2008 01:22PM
6681
October 19, 2007 03:31PM
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.