CREATE OR REPLACE TRIGGER EBP.INSERT_EBP_TRADING_PARTNERS BEFORE INSERT ON EBP.EBP_TRADING_PARTNERS REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW DECLARE tmpVar NUMBER; v_fax_subject_line VARCHAR2(60); BEGIN tmpVar := 0; SELECT SUBJECT_LINE INTO v_fax_subject_line FROM EBP_BILLERS WHERE BILLER_ID = :NEW.BILLER_ID; IF :NEW.FAX_SUBJECT IS NULL THEN :NEW.FAX_SUBJECT := v_fax_subject_line; END IF; EXCEPTION WHEN NO_DATA_FOUND THEN dbms_output.put_line('Warning: The Biller_Id does not exist in EBP_BILLERS table.'); END ; /
Thursday, January 22, 2009
Oracle Triggers
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment