Re: Is there a quick way to do counts on multiple columns

From: waltervdv <marcus.kuehl_at_t-online.de>
Date: 22 Nov 2001 02:35:32 -0800
Message-ID: <b2677297.0111220235.77a02e29_at_posting.google.com>


select count(*) from aTable
where COL1 = 'R'
or COL2 = 'R'
or ....

brandonfair_at_hotmail.com (Owen) wrote in message news:<20e5d4a1.0111211545.3a95e60b_at_posting.google.com>...
> if have some code that is something like
> SELECT COUNT(*) FROM aTable for COL1 ="R";
> SELECT COUNT(*) FROM aTable for COL2 ="R";
> SELECT COUNT(*) FROM aTable for COL3 ="A";
> SELECT COUNT(*) FROM aTable for COL4 ="B";
>
> Is there a way to combine these all into one statement?
>
>
> Thanks for any help
>
> Owen
Received on Thu Nov 22 2001 - 11:35:32 CET

Original text of this message