Board index » delphi » Re: Counting boolean fields

Re: Counting boolean fields


2006-02-25 04:34:01 AM
delphi197
dkeene writes:
Quote
For a boolean field in an interbase table, is there a way of counting
the occurrence of boolean true or false records? (i.e., for field
aboolean, of all the rocords, how many times is the field TRUE?
SELECT COUNT(*)
FROM FOO
WHERE FOO_BOOL = TRUE;
--
Craig Stuntz [TeamB] ?Vertex Systems Corp. ?Columbus, OH
Delphi/InterBase Weblog : blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
qc.borland.com -- Vote for important issues
 
 

Re: Counting boolean fields

Dear All:
For a boolean field in an interbase table, is there a way of counting the
occurrence of boolean true or false records? (i.e., for field aboolean, of
all the rocords, how many times is the field TRUE? Select count(aboolean)
seems to count the occurence of non-null records.
Thanks
Doug