Subject | Re: [firebird-support] trigger variables and colon prefix |
---|---|
Author | Helen Borrie |
Post date | 2006-08-10T14:36:49Z |
At 12:13 AM 11/08/2006, you wrote:
argument or output argument in a DML statement (SELECT, INSERT,
UPDATE, DELETE and EXECUTE PROCEDURE); otherwise it is not. The
IF() statement isn't DML so the usage in the first example is
incorrect and will cause an exception in some versions.
./heLen
>declare variable bc char(3);The colon is **required** when you refer to a local variable, input
>begin
> select orderappend from branches
> into :bc;
> if( substr( new.link, 1, 3) != :bc) then
> begin
>...
>
>declare variable bc char(3);
>begin
> select orderappend from branches
> into :bc;
> if( substr( new.link, 1, 3) != bc) then
> begin
>...
>
>Both compiles, but what is the difference, if any, between using a colon or
>not?
argument or output argument in a DML statement (SELECT, INSERT,
UPDATE, DELETE and EXECUTE PROCEDURE); otherwise it is not. The
IF() statement isn't DML so the usage in the first example is
incorrect and will cause an exception in some versions.
./heLen