db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veaceslav Chicu ...@infologic.fr>
Subject trigger
Date Mon, 07 Nov 2005 08:49:08 GMT
Hello,

how can I do that in derby?:
CREATE TRIGGER acc.ins_doc NO CASCADE BEFORE INSERT ON acc.doc
	REFERENCING NEW AS N
	FOR EACH ROW MODE DB2SQL
WHEN(
	SELECT FROM period
		WHERE state='O' AND
		N.cdate BETWEEN date_start AND date_end
) SIGNAL SQLSTATE 'ERRCODE' ('ERR MESSAGE')
@

another question, can I have 2 or more insert/update statements in after
trigger? how I do?
begin atomic
	update 1;
	update 2;
end
@

thank you,
Slavic

Mime
View raw message