Answered Returning a count.

  • Thursday, May 03, 2012 3:43 AM
     
      Has Code

    Returning a row count from an already existing query?

    select count(*) from
    (SELECT *
    FROM [original-data]
    WHERE State="AB")
    );

    It looks like I need to work on the syntax. Can this be made to work? My intent is to return the number of rows from:

    (SELECT *
    FROM [original-data]
    WHERE State="AB")

    Thank You!

All Replies

  • Thursday, May 03, 2012 4:10 AM
     
     Answered

    The query would be:

    SELECT count(*)
    FROM [original-data]
    WHERE State="AB"

    You can also use the DCount function. Look it up in the Help file.


    -Tom. Microsoft Access MVP

    • Marked As Answer by S.e.p.y Thursday, May 03, 2012 4:11 AM
    •