Subject Re: [firebird-support] select from select
Author Martijn Tonies
Hey Thomas,

You aren't requesting the below functionality for Database Workbench,
are you?
--
Martijn

> For example using TOAD with Oracle you can do something like
> that:
>
> SELECT AVG(FIELD) FROM (
>
> SELECT .... HUGE_FIELD_LIST ... FROM ..... <= cursor here
>
> )
>
> Position the cursor at the line of the inner select, and
> execute the SELECT statement. If you want to know how
> many records the inner-select returns, then you don't
> have to change the inner-select, but rather remove the
> empty lines before and after the inner-select, so that
> it will be:
>
> SELECT COUNT(FIELD) FROM (
> SELECT .... HUGE_FIELD_LIST ... FROM ..... <= cursor here
> )
>
> Execute this statement and you know how many records
> are returned from the inner-select.
>
> Right, perhaps the example is somewhat CONSTRUCTED *g*, but
> in some situations derived tables are useful. ;-)