Exception When Insert Followed By Delete In PL/PGSQL
Exception When Insert Followed By Delete In PL/PGSQL
От:
<cnliou@eurosport.com>
Дата:
Hello! The exception is raised by PL/PGSQL in version PostgreSQL 7.1.3.: triggered data change violation on relation "mastertable" The code having problem: DECLARE n smallint; BEGIN insert into MasterTable values...; SELECT COUNT(*) INTO n FROM DetailTable,MasterTable WHERE DetailTable.KeyField = MasterTable.KeyField; IF n = 0 THEN DELETE FROM MasterTable WHERE ...; --exception raised END IF; END; -------------------------------------------------------- You too can have your own email address from Eurosport. http://www.eurosport.com