Subject Re: [firebird-support] Possible Firebird BUG?
Author Arno Brinkman
Hi,

> >Yes, those are correctly returning the same values. You're INNER JOINing
the
> >tables.
> >
> >Using sub-selects is probably the thing you want
> >
> Wouldn't a left outer join do the same thing? If so, what's the
> advantage of a subselect?

Yes, because Count(Field) would only count not null fields, but when you
want to add a field to the select-list you must also add it to the group by
clause. Without diving into it deeply i think the outer joins would be more
expensive in this situation.

> >(i prefer sql-92 syntax
> >instead of sql-89):
> >
> What do you mean by this?

The SQL-92 syntax supports JOINS thus :

SELECT
*
FROM
Table1 t1
JOIN Table2 t2 ON (t2.ID = t1.ID)

instead of

SELECT
*
FROM
Table1 t1,
Table2 t2
WHERE
t2.ID = t1.ID


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