Subject Re: [firebird-support] Firebird Derived tables
Author Arno Brinkman
Hi,

> Does Firebird support derived tables?

No, Firebird doesn't (yet FB1.5) support derived tables, but you're showing
us sub-selects what is supported.

> SELECT C.ID, C.COMPANY, C.PARTNER, C.JOB_TYPE, C.FEE_ESTIMATE,
> C.DATE_OF_APPOINTMENT, C.ADJUSTMENT, C.PROVISION,
> (SELECT SUM(COST) FROM LEDGER L
> WHERE L.TYPE is null
> AND L.CCODE = C.ID) AS COST,
> (SELECT SUM(COST) FROM LEDGER L
> WHERE L.TYPE = 'DC'
> AND L.CCODE = C.ID) AS DIRECTCOST,
> (SELECT SUM(COST) FROM LEDGER L
> WHERE L.TYPE = 'FN'
> AND L.CCODE = C.ID) AS BILLING,
> (SELECT SUM(COST) FROM LEDGER L
> WHERE L.TYPE = 'EC'
> AND L.CCODE = C.ID) AS EMPCOST
> FROM CLIENTS C

Regards,
Arno Brinkman
ABVisie

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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 Interbase and Firebird users :
firebird-support@yahoogroups.com

Nederlandse firebird nieuwsgroep :
news://80.126.130.81