Hello ,
am having the following trigger working upon inserting
CREATE or REPLACE TRIGGER transactions_insert
AFTER INSERT ON wh_i_items
FOR EACH ROW
BEGIN
IF :new.BALANCE_QTY > 0 THEN
INSERT INTO wh_transactions
VALUES
(:new.store_id, (select NVL( MAX(TRANSACTION_SERIAL) +1 ,1) from wh_transactions), 9
,1 , SYSDATE , NULL , NULL , NULL , NULL , NULL , NULL , NULL , NULL ,
NULL , NULL , NULL , NULL , NULL , NULL );
END IF;
EXCEPTION
WHEN OTHERS THEN RAISE;
end transactions_insert;
/
Trigger created.
The problem is :
while inserting in the table
wh_i_items getting the following ,am getting this error after the first insertion of a record.
ORA-00001: unique constraint (DB.WT_NUMBER_TYPE_UK) violated
ORA-06512: at "DB.TRANSACTIONS_INSERT", line 8
ORA-04088: error during execution of trigger 'DB.TRANSACTIONS_INSERT'
am i missing something ?!
Regards,
Abdetu..