It's okay not to know all the answers. It's better to admit our ignorance than to believe answers that might be wrong. Pretending to know everything closes the door to finding out what's really there.
Hello Richard... awesome seminar! I have a question about counts. At 03:35 you show count of orders = 9 (with one being null and not counted) and then you show total count of all records = 10. Apparently the Count(*) does not count all records in the table if you use a WHERE clause in your SQL. For example, if you add WHERE State = "NY" would return 5 OrderCount and 5 TotalCount. How would I go about seeing the count of orders from "NY" but total record count would be 10? I hope this makes sense.
Thanks! Rob
Reply from Richard Rost:
If you add a WHERE clause, you're limiting your set of data. You would need to use two queries to generate both numbers (and then UNION them)... OR you could throw in a DCOUNT() function which could then count all of your records in the same query.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access SQL Seminar Part 2.