Subject Re: [firebird-support] New sequence syntax in triggers
Author Martijn Tonies
Hello Helmut,


> Preparing query:
> create trigger trg_genres for genres
> active before insert position 0
> as
> BEGIN
> if ((new.genreId is null) or (new.genreId = 0)) then
> begin
> new.genreId = next value for seq_genres
> *** IBPP::SQLException ***
> Context: Statement::Prepare(
> create trigger trg_genres for genres
> active before insert position 0
> as
> BEGIN
> if ((new.genreId is null) or (new.genreId = 0)) then
> begin
> new.genreId = next value for seq_genres )
> Message: isc_dsql_prepare failed
>
> SQL Message : -104
> Invalid token
>
> Engine Code : 335544569
> Engine Message :
> Dynamic SQL Error
> SQL error code = -104
> Unexpected end of command - line 8, column 38

It's not running the entire command, get a different script parser.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Sybase
SQL Anywhere, Oracle & MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com