Subject Trigger
Author Marcello Fontolan
Hi,

Following a advice on this group I am not using the DEFAULT value any
more (Delphi and IBX fault).
Now I am assigning the defaults values on a "before insert" trigger.
Is correct assign values to more than one field at the same trigger
like the above example or should I use one trigger for each field?

AS
BEGIN
IF (NEW.TREC IS NULL) THEN
NEW.TREC = GEN_ID(GEN_TREC_ID,1);
IF (NEW.VJUR IS NULL) THEN
NEW.VJUR = 0;
IF (NEW.VDSC IS NULL) THEN
NEW.VDSC = 0;
IF (NEW.VPAG IS NULL) THEN
NEW.VPAG = 0;
END

--

..::
Marcello Fontolan
marcello@...
::..