Subject | Re: [firebird-support] Re: Triggers |
---|---|
Author | Helen Borrie |
Post date | 2007-04-19T01:08:37Z |
At 10:25 AM 19/04/2007, you wrote:
Nando Dessena <nando@...> wrote:
copy this *as it is* into FlameRobin's query editor:
SET TERM ^;
CREATE TRIGGER Tri_Area FOR AREA
ACTIVE BEFORE INSERT
AS
BEGIN
new.SEQ = GEN_ID(AREA_NEXTNO,1);
END^
SET TERM ;^
Don't select any part of it and press F4. That should work.
------------------------------- Requote end
-- but, AGAIN, you inserted a space after the underscore character in
AREA_NEXTNO. So, AGAIN, you got the Invalid token error when the
parser encountered the space.
./heLen
>Nando,Start requote -------------------------------
>
>I did what you mensioned but I get the following;
>
>Starting transaction...
>Preparing query:
>CREATE TRIGGER Tri_Area FOR AREA
>ACTIVE BEFORE INSERT
>AS
>BEGIN
>new.SEQ = GEN_ID(AREA_ NEXTNO,1) ;
>END
>*** IBPP::SQLException ***
>Context: Statement::Prepare(
>CREATE TRIGGER Tri_Area FOR AREA
>ACTIVE BEFORE INSERT
>AS
>BEGIN
>new.SEQ = GEN_ID(AREA_ NEXTNO,1) ;
>END )
>Message: isc_dsql_prepare failed
>
>SQL Message : -104
>Invalid token
>
>Engine Code : 335544569
>Engine Message :
>Dynamic SQL Error
>SQL error code = -104
>Token unknown - line 6, column 24
>NEXTNO
Nando Dessena <nando@...> wrote:
copy this *as it is* into FlameRobin's query editor:
SET TERM ^;
CREATE TRIGGER Tri_Area FOR AREA
ACTIVE BEFORE INSERT
AS
BEGIN
new.SEQ = GEN_ID(AREA_NEXTNO,1);
END^
SET TERM ;^
Don't select any part of it and press F4. That should work.
------------------------------- Requote end
-- but, AGAIN, you inserted a space after the underscore character in
AREA_NEXTNO. So, AGAIN, you got the Invalid token error when the
parser encountered the space.
./heLen