I have 52 Yes/No Columns for attendance Weekly .. I want to make query to know the number of columns that put in it a Yes or No... Can anyone help me to solve this problem? Please let me know if you know of any recommend sites or communities for Access queries. Thanks.
相关问题
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- Difference between Types.INTEGER and Types.NULL in
- php PDO::FETCH_ASSOC doesnt detect select after ba
- Bulk update SQL Server C#
Here is a rough sketch of how you can work with a list. There are undoubtedly other and better ways, but it is a start.
A three week gap:
Number of attendances:
The table:
I think this is a poor design. It breaks first normal form.
I can envision a user table, a meeting table, and a many-to-many JOIN table linking users with the meetings that they attended.
Querying for all the meetings tells you the dates where it's possible to attend.
JOINing the user table with the user_meeting JOIN table tells you which meetings a given user attended.
Now you have two sets: all the possible meetings and the dates that a given user attended. If you do a set difference, you'll see the potential dates that the user did not attend.