Subject Re: [firebird-support] Variable references in IF() Include full colon or not?
Author Woody
From: "red_october_canada" <red_october_canada@...>
> There seems to be a difference in an IF() function if the condition
> includes a variable, and if the variable is prefixed by a full colon (:)
>
> Example: IF(V_MYVAR IS NULL) THEN
> versus IF(:V_MYVAR IS NULL) THEN
>
> FB 2.01 will not complain about either syntax.
> Which is correct? Include the semi-colon or not?
> And, in other cases, like subsequent UPDATEs or SELECTs (after the
> select that loaded the variable in the first place) should I include
> the full colon or not?

IIRC, the only time a colon is needed in front of a variable in a stored
procedure/trigger, is when it's used in a SQL statement, not in regular
"code".

HTH
Woody (TMW)