Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2004
    Posts
    2

    Unanswered: Count Records Between two dates

    Hi all,

    I've got a quick question.

    How would I count the number of records between two dates.

    I started with something like this.

    SELECT COUNT(*) AS COUNT, dtAdded
    FROM tSurveyPerson
    WHERE (dtAdded BETWEEN '2004-03-01' AND '2004-04-01')
    GROUP BY dtAdded

    but as you probably all know this ain't right. I would like to get just the number of records.

    Thanks

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Leave off the GROUP BY.

    -PatP

  3. #3
    Join Date
    Apr 2004
    Posts
    2
    got it...

    SELECT COUNT(dtAdded) AS numRecords
    FROM tSurveyPerson
    WHERE (dtAdded BETWEEN '2004-03-01' AND '2004-04-01')

    Thanks Pat

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •