trigger oracle update with two coditions [message #76539] |
Fri, 08 November 2002 11:38 |
Damien
Messages: 3 Registered: August 2002
|
Junior Member |
|
|
hi,
I'm trying to create that trigger but it doesn't work:
CREATE OR REPLACE TRIGGER qte_stock after UPDATE or insert ON skcons
FOR EACH ROW
BEGIN
update catalogue_produit set chpar1 = (select qte_stock from skcons
where code_ca = :new.code_ca and histo is null)
where code_ca = :new.code_ca;
END;
/
the trigger is well construct but when i update skcons there is a problem of mutation??
Thank you for your help
salut
|
|
|
Re: trigger oracle update with two coditions [message #76600 is a reply to message #76539] |
Thu, 23 January 2003 12:40 |
Guadalupe Zamudio Cabello
Messages: 1 Registered: January 2003
|
Junior Member |
|
|
HAve you ever tried to do this
update catalogue_produit set chpar1 = TABLE1.FIELD1
FROM (select FIELD1=qte_stock
from skcons
where code_ca = :new.code_ca and histo is null) AS TABLE1
where code_ca = :new.code_ca;
I do this with SQL Server but maybe could help with Oracle. After all SQL is a universal language.
|
|
|
|