Subject | Re: [ib-support] count records |
---|---|
Author | Martijn Tonies |
Post date | 2002-08-23T15:00:06Z |
Hi,
get a single result row except for this:
select (
(select count(aktid) from akt where akt. <whereclause>) +
(select count(kliid) from kli where <whereclause> ) ) as mycount
from rdb$database
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> I need to count records in 2 tables that have a fieldAs the tables have no relation, I can't think of a way to
> that is '100%' and add the counted records together.
> The tables have no relation.
>
> It would work like this:
>
> select count(aktid) from akt
> where akt.avtaldebid = '100%' + select count(kliid)
> from kli where kli.avtaldebid = '100%'
get a single result row except for this:
select (
(select count(aktid) from akt where akt. <whereclause>) +
(select count(kliid) from kli where <whereclause> ) ) as mycount
from rdb$database
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."