Subject Dynamic SQL Error: need help understanding
Author homerjones1941
I can't find the error message shown below, in any documentation. I've searched the web, and still no help. Using Firebird, manage with IBExpert.

Error Message:

Invalid token.
Dynamic SQL Error.
SQL error code = @1.
Token unknown - line @1, column @2.

My code snippet below. I think the problem is with the last line I included. At least it is the one highlighted by IBExpert.

create or alter trigger IBE$DETA_AU for DETA
active after update position 32767
declare variable TID integer;
declare variable VUSER varchar(3);
declare variable VPOS integer;
TID = gen_id(IBE$LOG_TABLES_GEN, 1);
VPOS = position('@', :VUSER);
if (:VPOS <> 0) then VUSER = substring(VUSER from 1 to (:VPOS - 1));