Subject | Re: select from select |
---|---|
Author | Svein Erling |
Post date | 2003-11-21T11:50:21Z |
Hello Stefan!
Firebird does not support selecting from a result set, but what you
can do is:
SELECT T2.*
from T2
WHERE EXISTS(SELECT * FROM T1 WHERE T1.COLUMN = T2.COLUMN)
or (if joining on a unique value of T1)
SELECT T2.*
from T2
JOIN T1 ON T1.COLUMN = T2.COLUMN
Set
--- In firebird-support@yahoogroups.com, "koronkas" <koronkas@y...>
wrote:
Firebird does not support selecting from a result set, but what you
can do is:
SELECT T2.*
from T2
WHERE EXISTS(SELECT * FROM T1 WHERE T1.COLUMN = T2.COLUMN)
or (if joining on a unique value of T1)
SELECT T2.*
from T2
JOIN T1 ON T1.COLUMN = T2.COLUMN
Set
--- In firebird-support@yahoogroups.com, "koronkas" <koronkas@y...>
wrote:
> Hello to everyone,select.
>
> First of all, I am very delighted and impressed by Firebird.
> However, I encountered an issue which I couldn't solve.
> I need to do something like:
>
> SELECT * FROM ( SELECT * FROM T1 ) T2;
>
> (ok, this is a verry dummy sample, but basically this is what i
> need)
> For example, in IBExpert I get "invalid token" for the second
>
> The question is - am I missing something or this kind of construct
> is not (yet) possible in Firebird? (I am using now 1.5RC7)