hello
I want to update in one trigger the tables in to another schema but it doesn't work but when i select data from sql prompt it works fine.
can any body help me.
thanks.
I want to update in one trigger the tables in to another schema but it doesn't work but when i select data from sql prompt it works fine.
can any body help me.
thanks.
Code:
CREATE OR REPLACE TRIGGER Product_Detail_TR
BEFORE
INSERT ON Product_Detail FOR EACH ROW
DECLARE
PRE_ITEM_ID NUMBER :=0 ;
BEGIN
select :new.Item_Id into PRE_ITEM_ID from dual ;
Select Product_Detail_SEQ.NextVal into :New.Item_Id from Dual;
update neo.GIFT_NOTES set Item_Id=:New.Item_Id where Item_Id=PRE_ITEM_ID ;
update neo.PRODUCT_DIGITAL_DOWNLOAD set Item_Id=:New.Item_Id where Item_Id=PRE_ITEM_ID ;
End;
Warning: Trigger created with compilation errors.
SQL> show errors trigger product_detail_tr
Errors for TRIGGER PRODUCT_DETAIL_TR:
LINE/COL ERROR
-------- -----------------------------------------------------------------
6/1 PL/SQL: SQL Statement ignored
6/12 PL/SQL: ORA-00942: table or view does not exist
7/1 PL/SQL: SQL Statement ignored
7/12 PL/SQL: ORA-00942: table or view does not exist
SQL> select count(*) from neo.product_digital_download;
COUNT(*)
----------
54565
Comment