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

Count problem in ACCESS

P: 15
Hello,

i have used the following statement but the count doesn't return a correct value, could any one help me please.

SELECT IT_BE.Name, Count(IT_BE.rowNr) AS Nr
FROM IT_BE
GROUP BY IT_BE.Name;

I have three records in the table(IT_BE) but i become 1 as Nr instead of 3. What am i doing wrong?

thanks in advance.

Best regards,
Maryan
Mar 5 '08 #1
Share this Question
Share on Google+
2 Replies


P: 15
I am sure that the group by cause the problem but it's impossible to use count without group by.

How can i do that?
Mar 5 '08 #2

P: 15
Hello,

excuse me for the question. The Statement must be like this:

SELECT IT_BE.Name, (SELECT count(rowNr) from IT_BE) as [count]
FROM IT_BE;

Then it will work.
Mar 5 '08 #3

Post your reply

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