Quote:
Originally posted by lelle12
Not sure what you mean. To investigate if there are triggers, you can select from syscat.triggers. I.e.
select * from syscat.triggers where trigname = 'KT_Key_Table_Upd'
But inorder to get rid of a trigger you use drop. I.e.
drop trigger DBO.KT_Key_Table_Upd
BTW, could you post ddl for the table and trigger?
/Lennart
|
Here are the Definitions:
-- SELECT * FROM SYSCAT.TRIGGERS
-- * DROP TABLE DBO.KL_Key_LastGen
CREATE TABLE DBO.KL_Key_LastGen (
KL_Table_Key VARCHAR(18) NOT NULL,
KL_Last_NKey INT DEFAULT 1 NOT NULL,
KL_Last_CKey VARCHAR(20) DEFAULT '1' NOT NULL,
KL_DayStamp SMALLINT DEFAULT 0 NOT NULL,
KL_Edit_Who VarChar(30) DEFAULT USER,
KL_Edit_When TIMESTAMP DEFAULT CURRENT TIMESTAMP,
CONSTRAINT PK_KL_Key_LastGen PRIMARY KEY (KL_Table_Key)
)
-- DROP TRIGGER DBO.KL_Key_LastGen_Upd
CREATE TRIGGER DBO.KL_Key_LastGen_Upd
NO CASCADE BEFORE INSERT ON DBO.KL_Key_LastGen
REFERENCING NEW AS NEWROW
FOR EACH ROW MODE DB2SQL
set newrow.KL_Edit_When = current timestamp, KL_Edit_Who = USER