db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Hill <thomas.k.h...@t-online.de>
Subject Re: trigger calling a procedure
Date Wed, 24 Oct 2012 07:36:17 GMT
> Hi Thomas,
> 
> I think you'd need to add a REFERENCING clause to the trigger definition
> and pass in the new value as an argument to the procedure. Something
> like:
> 
>   CREATE TRIGGER "TR_XY"
>      AFTER INSERT
>      ON "TBL_XY"
>      REFERENCING NEW AS NEW
>      FOR EACH ROW
>      CALL "SP_xy"('xyz', 0, NEW."RowID")
> 
> Hope this helps,
> 


Hi,

referencing NEW as NEW I could add although not sure why this is needed 
(e.g. NEW as UPDATEROW or something, but NEW as NEW?). 

Is passing the value in the only option? 
For compatibility with how other data
base backends (PostgreSQL) do this I would prefer 
if there would be an option to access the value 
from within the procedure. 
Can someone confirm whether this is possible or not in Derby please?

Many thanks.

Thomas



Mime
View raw message