Access SQL query with mathematical logic question

R

Rachel

I have a table where each row represents a certain
company. The columns represent different performance
categories. The column entries are percentage values
identifying the company's performance in that category.
How can I run an Access SQL query that will display the
list of companies that have failed in more than 4
categories (marks less than 50%)?

Any help would be appreciated. Thanks!
 
S

Steve

Could you make a query based on the table, and then make an additional
column for each category where you use an if statement to determine pass or
fail, and then have another "Total" column that adds the pass/fail (say 0/1)
values from the new columns, and then use an if statement to make that
column 1 or 0?

For example, you have a column called category1. You make a new column
called, say, cat1pass which would have a field value of cat1pass:
iif([category1] > .5, 1, 0). Do that for each category. Then have another
column with a field value of totalpass:iif([cat1pass]+[cat2pass]+etc <
4,0,1). A zero in the totalpass column would tell you if a company passes or
fails.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top