Abort inserting a record in a table using a trigger
Is there any way to abort inserting a record in a table using a trigger?
For full details, I have the following table ("myTable"):
BSC INTEGER NOT NULL,
BTS VARCHAR2(20) NOT NULL,
myTable_PK = PRIMARY KEY (BSC,BTS)
I have also a stored procedure that imports a data from text file and inserts them to the specified table (using UTL_FILE package). The stored procedure works great.
But the thing that in the text file itselft it might be (due to third-parity report generation bug) that the primary key will be violated or the BSC/BTS field has null value. In such case I just want to ignore the insertion statement using a trigger.