ORA-06512 & ORA-04088 error message but my trigger compiles without errors!? [message #28660] |
Wed, 14 January 2004 00:48  |
Patrick Tahiri
Messages: 119 Registered: January 2004
|
Senior Member |
|
|
Hi,
I'm working with Oracle 8i Release 8.1.7.2.0...
I have compiled a "simple" trigger without receiving any errors during compilation (compiled successfully!). But when I provoque the trigger to fire I receive my custom error message which is correct (raise_application_error) BUT I do receive also these two errors:
ORA-06512: at "STAT.CPAP_MASTER_CONTENT_COST-TRG"
ORA-04088: error during execution of trigger: "STAT.CPAP_MASTER_CONTENT_COST-TRG"
Could someone please tell me why? What does these combined ORA messages define and mean?
What can I do to avoid or repare thes kind of errors?
Here is my trigger:
CREATE OR REPLACE TRIGGER CPAP_MASTER_CONTENT_COST_TRG
BEFORE INSERT OR UPDATE ON stat.CPAP_MASTER_CONTENT_COST
FOR EACH ROW
DECLARE
v_cc_id NUMBER;
BEGIN
IF ((UPDATING OR INSERTING) AND :NEW.COUNTRY_CODE = -1)
THEN
SELECT count(*) INTO v_cc_id FROM stat.CPAP_CONTENT_COST
WHERE CONTENT_CUSTOMER_ID = :NEW.CONTENT_CUSTOMER_ID
AND LEVEL_ID = :NEW.LEVEL_ID
AND LEVEL_ID2 = :NEW.LEVEL_ID2
AND LEVEL_TYPE = :NEW.LEVEL_TYPE
AND PERIOD_START = :NEW.PERIOD_START
AND RATE_IS_FIXED_VALUE = :NEW.RATE_IS_FIXED_VALUE
AND RATE = :NEW.RATE;
IF (v_cc_id != 0)
THEN
raise_application_error(-20000,'Custom Error');
END IF;
END IF;
END CPAP_MASTER_CONTENT_COST_TRG;
Thank you very much for your tips!
Best regards,
Patrick.
|
|
|
|
|