Subject Re: [firebird-support] Subselects in FROM
Author Daniel Rail

At July 23, 2004, 05:39, Alejandro wrote:
> I've read somewhere that fb supports subselects, and in fact I've
> seen examples of the form:

> select * from table where field not in (select ...).

> Now I'm trying to use a subselect in the from part in this way:

> select *
> from
> (select ...) as subsel
> where ...

> But I can't get it to work, and reading the specs it seems that this
> isn't supported. Is that true?

True. But, it is going to be supported in version 1.6, planned for
release by the end of the year.

> Are some workaround for this apart
> from views?

Yes you can use Views, but remember that views don't support
parameters in their declarations. If you need more flexibility, you
can use selectable stored procedures.

And if you don't mind a bit of instability, you can try the HEAD
branch of the source code of Firebird. That branch is supposed to
become FB 1.6 and already has the subqueries implemented.

Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (
ACCRA Med Software Inc. (