Andy Lacey
andy at minstersystems.co.uk
Wed Oct 12 08:58:43 CDT 2005
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