My Oracle Support Banner

Problem With Compound Triggers Losing Local Values When Executing A Merge Statement. (Doc ID 1393441.1)

Last updated on FEBRUARY 11, 2019

Applies to:

PL/SQL - Version and later
Information in this document applies to any platform.


The value of a variable initialized in a compound trigger "BEFORE STATEMENT" is nullified prior to executing the subsequent statement ("BEFORE ROW") when a MERGE sql statement is executed.

The following sample illustrates the issue.

This is the table to be used.

The ORA-01400 occurs because of the "Not Null" constraint.  Since TS is nullified, the insert fails.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.