db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "tim.wickett" <...@nextech-technology.co.uk>
Subject Raising a user defined exception in a trigger
Date Tue, 30 Jul 2013 21:44:59 GMT
I have searched the forum and although I can find something similar it didn't
really seem to solve my problem.

CREATE TRIGGER insert_waste_container
    NO CASCADE BEFORE INSERT ON waste_container
    REFERENCING NEW AS new_waste_container
    FOR EACH ROW MODE DB2SQL
    WHEN (new_waste_container.contains_haz_waste IS TRUE
        AND new_waste_container.contains_rad_waste IS TRUE)
        BEGIN ATOMIC
            DECLARE invalid_container_row
                EXCEPTION FOR SQLSTATE 38000;
            SIGNAL invalid_container_row;
        END;

I have copied this trigger from another DB and tried to correct but I cannot
get it to work. From the reference docs i'm not even sure if I can do this?

Thanks

Tim



--
View this message in context: http://apache-database.10148.n7.nabble.com/Raising-a-user-defined-exception-in-a-trigger-tp132927.html
Sent from the Apache Derby Users mailing list archive at Nabble.com.

Mime
View raw message