Subject | Re: [firebird-support] Trigger variable in function parameter |
---|---|
Author | Helen Borrie |
Post date | 2006-05-19T10:55:37Z |
At 08:26 PM 19/05/2006, you wrote:
useful to show how you actually use these things.
However, the rule is that, when a variable is being referred in PSQL
language, it's the same as referring to it in any programming
language. So, for example, had your usage above been an assignment
to a variable, it would be correct.
e.g.
...
declare v2 numeric(18,2);
...
v2 = coalesce(v,0);
But if you were using the variable in a DSQL statement, it should
except if you try to refer to it without the colon marker:
Wrong:
select coalesce(v,0) from rdb$database into v2;
Should be
select coalesce(:v,0) from rdb$database into :v2;
./heLen
>Why server accepts this statement:coalesce(v,0) on its own is nothing so, when you complain, it's
>
>declare variable v numeric(18,2);
>...
>coalesce(v, 0)
>
>I forgot to write ":" by the variable and had a headace for half of a
>day. Where is the point of accepting variable in parameters without ":"?
useful to show how you actually use these things.
However, the rule is that, when a variable is being referred in PSQL
language, it's the same as referring to it in any programming
language. So, for example, had your usage above been an assignment
to a variable, it would be correct.
e.g.
...
declare v2 numeric(18,2);
...
v2 = coalesce(v,0);
But if you were using the variable in a DSQL statement, it should
except if you try to refer to it without the colon marker:
Wrong:
select coalesce(v,0) from rdb$database into v2;
Should be
select coalesce(:v,0) from rdb$database into :v2;
./heLen