Subject Re: [firebird-support] Re: SQL Problem
Author Arno Brinkman
Hi,

> I want to count all orders and customers and want the sum of all weights
and
> quantities.
> But weights and quantities should only be counted once per order.
> I thought this is a standard problem.
> I cannot use a view because joins and where clause is dynmacily created.

You're joining more tables then the two Customers and Orders tables?
Looking at you're query i understand you need only those two for these
results. Could you post the whole query?

> I would need a select on a select(temporary tables), but this seems not to
> be possible in Firebird.

What you want is derived tables, but that's indeed currently not supported.
(FB2.0 will have it).

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://newsgroups.firebirdsql.info