Subject Re: [firebird-support] Re: Triggers
Author Helen Borrie
At 12:08 PM 18/04/2007, Adam wrote:

>2. It looks like FlameRobin is using ; as a SQL command terminator.
>Because the trigger is internally needing one, FlameRobin only sees
>down to the first ; so it does not see a valid create trigger statement.
>
>Try using
>
>SET TERM ^ ;
>
>CREATE TRIGGER Tri_Area FOR AREA
>ACTIVE BEFORE INSERT
>AS
>BEGIN
> new.SEQ = GEN_ID(AREA_NEXTNO,1);
>END
>^
>
>SET TERM ; ^

Beyond the boundaries of the isql application, DSQL statements don't
have terminators. SET TERM and the whole concept of "statement
terminators" are application-specific to isql. (That the default
terminator that the isql shell imposes on itself, which is arbitrary,
happens to mimic the PSQL statement terminator, which is not
arbitrary, is coincidental..some would even call it "silly"...)

As an accommodation for users who haven't got around to reading the
literature, some third-party interactive SQL apps *tolerate*
extraneous terminators on statements and even SET TERM statements in
scripts, by parsing them out. Maybe FlameRobin does this, maybe
not...I use IB_SQL, which does. It's certainly not a bug in a 3P
application if it doesn't do this laundering, though.

./heLen