Count problem in ACCESS

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Maryan
    New Member
    • Feb 2008
    • 15

    Count problem in ACCESS

    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.row Nr) 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
  • Maryan
    New Member
    • Feb 2008
    • 15

    #2
    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?

    Comment

    • Maryan
      New Member
      • Feb 2008
      • 15

      #3
      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.

      Comment

      Working...