Subject | Dynamic SQL Error: need help understanding |
---|---|
Author | homerjones1941 |
Post date | 2011-03-18T23:00:44Z |
I can't find the error message shown below, in any documentation. I've searched the web, and still no help. Using Firebird 2.1.3.18185, manage with IBExpert.
Error Message:
Invalid token.
Dynamic SQL Error.
SQL error code = @1.
Token unknown - line @1, column @2.
@1.
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
as
declare variable TID integer;
declare variable VUSER varchar(3);
declare variable VPOS integer;
begin
TID = gen_id(IBE$LOG_TABLES_GEN, 1);
VUSER = new.USER_FOR_LOGGING;
VPOS = position('@', :VUSER);
if (:VPOS <> 0) then VUSER = substring(VUSER from 1 to (:VPOS - 1));
Error Message:
Invalid token.
Dynamic SQL Error.
SQL error code = @1.
Token unknown - line @1, column @2.
@1.
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
as
declare variable TID integer;
declare variable VUSER varchar(3);
declare variable VPOS integer;
begin
TID = gen_id(IBE$LOG_TABLES_GEN, 1);
VUSER = new.USER_FOR_LOGGING;
VPOS = position('@', :VUSER);
if (:VPOS <> 0) then VUSER = substring(VUSER from 1 to (:VPOS - 1));