By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,223 Members | 1,633 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,223 IT Pros & Developers. It's quick & easy.

count function query

P: 2
Hi
I'm trying to run two count querys on one column in access. its like an if statement, i want to count all rows where sale >=40 and name as pass and a second column where sale is <=39 as fail. can anyone help please?
Feb 6 '08 #1
Share this Question
Share on Google+
3 Replies


trueadvantage
P: 12
Hi
I'm trying to run two count querys on one column in access. its like an if statement, i want to count all rows where sale >=40 and name as pass and a second column where sale is <=39 as fail. can anyone help please?

Hi,

please go through this site

[link removed] you will get all details about querys and access.
Feb 6 '08 #2

P: 2
Hi,

please go through this site

http://www.learnaccessnow.com you will get all details about querys and access.
hi thanks for that link. i forgot to mention in my post that i need to write it in sql.
Feb 6 '08 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Hi
I'm trying to run two count querys on one column in access. its like an if statement, i want to count all rows where sale >=40 and name as pass and a second column where sale is <=39 as fail. can anyone help please?
The following SQL example should head you in the right direction.

Expand|Select|Wrap|Line Numbers
  1. SELECT Sum(IIf([sale]>=40, 1, 0) As Pass, Sum(IIf([sale]<40, 1, 0) As Fail
  2. FROM TableName;
  3.  
Feb 7 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.