Exception block inside trigger?

Bart Pietercil bart.pietercil at gmail.com
Tue Sep 25 08:41:15 CDT 2007


Hi List,

1) Is it acceptable to have an exception block inside a trigger ?

2) is this a valid trigger ? More precisely is NEW.recid acceptable  
inside a before insert trigger ?

CREATE OR REPLACE TRIGGER "trigger_tbl_users_BI" BEFORE INSERT

     ON "tbl_users" FOR EACH ROW

     BEGIN
	if @user_id IS NOT null then
		NEW.objptr_created_by = @user_id;

		NEW.objptr_modified_by = @user_id;
	else
		NEW.objptr_created_by = NEW.recid;-----> ??
		NEW.objptr_modified_by = NEW.recid;---->??
	End IF
         NEW.creation_dt = NOW();

         NEW.modification_dt = NOW();

		

     END;


tia

Bart Pietercil


More information about the Valentina mailing list