db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veaceslav Chicu ...@infologic.fr>
Subject Re: trigger
Date Tue, 08 Nov 2005 08:03:19 GMT
where I can read or find examples for triggers?

thank you,
Slavic

Veaceslav Chicu wrote:
> nobody know?
> 
> best regards,
> Slavic
> 
> Veaceslav Chicu wrote:
> 
>>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