Subject Re: How to call a STORED PROCEDURE in SQL statement : select ProcA(col1) from ..
Author Adam
> Thanks Martijn and Adam. The workaround works well. It does help a
> lot.

I would venture further than claiming it as a work around. Work
arounds have temporary connotations, and even if stored functions are
introduced, this method would still work fine. Given that it mentions
that "A valid SQL expression that results in a single value" is legal,
then I would suggest this particular issue (returning the value of a
stored procedure in part of a select) has been considered and this is
the method they came up with.

>
> 1) It is strange that this tip is NOT mentionned in the book of
Helen Borrie "The Firebird book".

I will take your word on that. My book is at work and I am not :D

> 2) Nowhere in the Interbase V6 manuals have I seen the possibility to
> have a select in place of a column in a select statement. Is it a new
> feature of Firebird or something that is not documented? The syntax
> mentions that a column can be an "expr" which is "A valid SQL
> expression that results in a single value" but it does not define what
> a SQL expression is.

So it is mentioned, just maybe not as clear as it could be, but a
better approach than "Firebird needs feature X" is to say "I have
problem Y that I thought may be possible using feature X. Is feature X
available or is there another way to do it?

Adam