Oracle Version : 10g As you know inside a Oracle row trigger you cannot access to the base table, for example when you make a trigger like this, on a table named “activity“.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
CREATE OR REPLACE TRIGGER UNAME.ACTIVITY_FK_MENU_INTEGRITY AFTER INSERT OR UPDATE ON UNAME.ACTIVITY REFERENCING NEW AS New OLD AS Old FOR EACH ROW DECLARE tmpVar NUMBER; e_Menu_Already_Exists EXCEPTION; BEGIN Select count(*) into tmpVar from Activity aa where (aa.fk_menu = :new.fk_menu)and(aa.pk_id <> :new.pk_id); -- if (tmpVar > 0) then --:New.FK_MENU := null; -- raise e_Menu_Already_Exists; -- end if; END ACTIVITY_FK_MENU_INTEGRITY; |
when you try to use the table making an update happen this : To avoid this error and obviusly assuming the…
Leggi tutto
FlameRobin is an open source and cross platform database administration tool for Firebird DBMS. some info : Project Site : http://www.flamerobin.org/ Dev.Tools/Lang : C++ download site : http://sourceforge.net/project/showfiles.php?group_id=124340&package_id=136187& (high lights) New features – 100% Firebird 2.1 compatible – Tab-based property pages for database object (like Firefox browser) – DataGrid: load and save to file options…
Leggi tutto