Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    65

    Unanswered: How to count instances over multiple fields

    Hi!

    Is there a way in SQL where you can count the number of instances over multiple fields?

    I have 10 Yes/No fields and I want to have a statement that will check if there's more than 1 Yes answer on those 10 fields.

    The reason why I need this is because I have another field that only gets filled in if I have more than 1 Yes.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    SELECT SUM(IIf(Field1=True,1,0) + IIf(Field2=True,1,0) + ...) FROM MyTable;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •