Subject | Re: [firebird-support] Way to avoid many subselects |
---|---|
Author | Arno Brinkman |
Post date | 2007-07-17T21:39Z |
Hi Sean,
It should not be allowed to reference to an outer context from a derived table.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info
> Since you're running v2+Are you sure?
>
> You can do:
>
> select
> inv.id,
> inv.date,
> inv.number,
> inv.ship_date
> from
> customers cus
> JOIN (
> select First 1
> id,
> date,
> number,
> ship_date
> from invoices
> where
> customer_id = cus.customer_id
> order by id desc
> ) as Inv on 1 = 1
It should not be allowed to reference to an outer context from a derived table.
Regards,
Arno Brinkman
ABVisie
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
General database development support:
http://www.databasedevelopmentforum.com
Firebird open source database (based on IB-OE) with many SQL-99 features :
http://www.firebirdsql.org
http://www.firebirdsql.info
http://www.fingerbird.de/
http://www.comunidade-firebird.org/
Support list for Firebird and Interbase users :
firebird-support@yahoogroups.com
Nederlandse firebird nieuwsgroep :
news://newsgroups.firebirdsql.info