Subject | Set generator in execute block |
---|---|
Author | Si Carter |
Post date | 2012-02-08T19:07:42Z |
Hi,
When trying to execute the following it produces an error:
SET TERM ^ ;
EXECUTE BLOCK
AS
DECLARE VARIABLE vMaxID BIGINT;
BEGIN
SELECT MAX(ID) FROM A_TABLE
INTO :vMaxID;
SET GENERATOR GEN_A_TABLE_ID TO :vMaxID;
END
SET TERM ; ^
the error being
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 10, column 3
SET
I have tried wrapping it in an EXECUTE STATEMENT block to the same effect.
Is setting a generator value in an execute block not supported or am I
doing something obvious wrong?
any help appreciated.
rgds
Si
When trying to execute the following it produces an error:
SET TERM ^ ;
EXECUTE BLOCK
AS
DECLARE VARIABLE vMaxID BIGINT;
BEGIN
SELECT MAX(ID) FROM A_TABLE
INTO :vMaxID;
SET GENERATOR GEN_A_TABLE_ID TO :vMaxID;
END
SET TERM ; ^
the error being
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -104
Token unknown - line 10, column 3
SET
I have tried wrapping it in an EXECUTE STATEMENT block to the same effect.
Is setting a generator value in an execute block not supported or am I
doing something obvious wrong?
any help appreciated.
rgds
Si