[AccessD] Counting Fields

Boyd, Mark Thomas (US - Philadelphia) mboyd at deloitte.com
Wed Oct 12 09:13:30 CDT 2005


Works perfectly!  Thanks. 


Mark Boyd
Senior Consultant
Enterprise Risk Services
Deloitte & Touche LLP
 
Tel: +1 215 405 5576
mboyd at deloitte.com
www.deloitte.com


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Andy Lacey
Sent: Wednesday, October 12, 2005 9:59 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Counting Fields

SELECT IIF(Field1="X",1,0)+IIF(Field2="X",1,0)+....    AS CountX FROM
.....

--
Andy Lacey
http://www.minstersystems.co.uk




--------- Original Message --------
From: "Access Developers discussion and problem solving"
<accessd at databaseadvisors.com>
To: "AccessD" <accessd at databaseadvisors.com>
Subject: [AccessD] Counting Fields
Date: 12/10/05 13:42


I have a table that contains a value of "X" in any or all of 7 fields.
For example, Record 1 has an "X" in fields [Field1], [Field2], and
[Field7].

Is there an easy way within a select query to get a total count of "X"'s
in the record?

Thanks,
Mark Boyd
Sr. Consultant
Deloitte & Touche LLP


This message (including any attachments) contains confidential
information
intended for a specific individual and purpose, and is protected by law.
If
you are not the intended recipient, you should delete this message.


Any disclosure, copying, or distribution of this message, or the taking
of
any action based on it, is strictly prohibited. [v.E.1]
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

________________________________________________
Message sent using UebiMiau 2.7.2

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list