You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running following statement as a single changeset,
CREATE TRIGGER TRG_DO_DELETE BEFORE
DELETE ON TABLE_TEST REFERENCING OLD ROW OLDROW
FOR EACH ROW
BEGIN
IF :OLDROW.IS_DEFAULT = TRUE THEN
DECLARE DELTABLE_TEST_ERROR CONDITION FOR SQL_ERROR_CODE 10002;
DECLARE EXIT HANDLER FOR DELTABLE_TEST_ERROR RESIGNAL;
SIGNAL DELTABLE_TEST_ERROR SET MESSAGE_TEXT = 'Cannot delete default';
END IF;
END;
the syntax error will be reported and the script is parsed as "CREATE TRIGGER TRG_DO_DELETE BEFORE
DELETE ON TABLE_TEST REFERENCING OLD ROW OLDROW
FOR EACH ROW
BEGIN
IF :OLDROW.IS_DEFAULT = TRUE THEN
DECLARE DELTABLE_TEST_ERROR CONDITION FOR SQL_ERROR_CODE 10002;
DECLARE EXIT HANDLER FOR DELTABLE_TEST_ERROR RESIGNAL;
SIGNAL DELTABLE_TEST_ERROR SET MESSAGE_TEXT = 'Cannot delete default';
END"
BTW, when more trigger creations are put into a single changeset, it will be not split into two stataments and syntax error will be reported which is similar to run when scripts including multiple trigger creations.
The text was updated successfully, but these errors were encountered:
Hello,
When running following statement as a single changeset,
CREATE TRIGGER TRG_DO_DELETE BEFORE
DELETE ON TABLE_TEST REFERENCING OLD ROW OLDROW
FOR EACH ROW
BEGIN
IF :OLDROW.IS_DEFAULT = TRUE THEN
DECLARE DELTABLE_TEST_ERROR CONDITION FOR SQL_ERROR_CODE 10002;
DECLARE EXIT HANDLER FOR DELTABLE_TEST_ERROR RESIGNAL;
SIGNAL DELTABLE_TEST_ERROR SET MESSAGE_TEXT = 'Cannot delete default';
END IF;
END;
the syntax error will be reported and the script is parsed as "CREATE TRIGGER TRG_DO_DELETE BEFORE
DELETE ON TABLE_TEST REFERENCING OLD ROW OLDROW
FOR EACH ROW
BEGIN
IF :OLDROW.IS_DEFAULT = TRUE THEN
DECLARE DELTABLE_TEST_ERROR CONDITION FOR SQL_ERROR_CODE 10002;
DECLARE EXIT HANDLER FOR DELTABLE_TEST_ERROR RESIGNAL;
SIGNAL DELTABLE_TEST_ERROR SET MESSAGE_TEXT = 'Cannot delete default';
END"
BTW, when more trigger creations are put into a single changeset, it will be not split into two stataments and syntax error will be reported which is similar to run when scripts including multiple trigger creations.
The text was updated successfully, but these errors were encountered: