Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » trigger oracle update with two coditions
trigger oracle update with two coditions [message #76539] Fri, 08 November 2002 11:38 Go to next message
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 Go to previous messageGo to next message
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.
Re: trigger oracle update with two coditions [message #76900 is a reply to message #76600] Wed, 25 February 2004 00:24 Go to previous message
hzg
Messages: 1
Registered: February 2004
Junior Member
only SqlServer suport the SELECT FROM stucture!!!
Previous Topic: Functionality of application server
Next Topic: Connecting to Oracle Database which is some 50 Km away
Goto Forum:
  


Current Time: Sat Mar 02 18:33:39 CST 2024