Subject Re: [firebird-support] Trigger variable in function parameter
Author Martijn Tonies

> Why server accepts this statement:
> 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 ":"?

Because it works.

That is, assuming the "coalesce" part is used OUTSIDE a SQL statement.

When using variables/parameters in SQL statements, always include the
":", in other statements, don't use them.

If your question is about why it worked inside a SQL statement, then it's
probably because you have a column named "v".

Martijn Tonies
Database Workbench - development tool for Firebird and more!
Upscene Productions
My thoughts:
Database development questions? Check the forum!