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

> 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
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com