Results 1 to 2 of 2

Thread: Query of 2 different values for same field?

  1. #1
    Join Date
    Aug 2005

    Question Query of 2 different values for same field?

    I have a database table with a boolean field for whether a user finishes a module. I then want to query how many times a student was able to finish a module and how many times a student wasn't able to finish. Since the sum of these two numbers is not always the same, I can't simply subtract one value from a known number to get the other value.

    So, is it possible to have a query where I request the count of the records where this field is true and where this field is false rather than performing 2 queries?


  2. #2
    Join Date
    Jun 2004
    your sql statememt would look something like...
    SELECT COUNT(idColumn) AS varCount FROM someTable WHERE someVar = 'true'

    then access varCount inside the recordset return

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Recent Articles