Subject Re: [firebird-support] Re: ISQL & trigger -- this worked at last !!!
Author Martijn Tonies
> > You forgot to put terminator after the Create Trigger command, i.e.
> > ...
> > > THEN NEW.my_number = GEN_ID(my_generator, 1);
> > > END !!
> > > SET TERM ; !!
>
> Well ... this is the version the -finally :-)) - worked out
> SET TERM !!;
> --- added by me
> CREATE TRIGGER my_before_trigger FOR my_table
> BEFORE INSERT
> AS
> BEGIN
> IF (NEW.my_number IS NULL)
> THEN NEW.my_number = GEN_ID(my_generator, 1); --- <<======
> END !! --- <<=====
> --- added by me
> SET TERM ; !!
>
> Just to understand : Is it normal or is the paricular for Mitec SQL
> Editor ?

Ehm... brilliant! But - this was exactly _as expected_ and as
told by several people :-)

With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com