I posted this a day ago at
After I started populating data I found that the solutions do not work..
Got two tables Category and Product_Table
Category table has the following Fields:
The ClearanceID in the product_table is populated with the CatID from the Category table
What I am trying to do is make a record set that Lists the CategoryID, ClearanceID (or CatID as they are the same) , MainCat and SubCat with a COUNT of how many products in the Product_Table have matching ClearanceID
So the record set would look something like this
CategoryID, MainCat ,SubCat , TheCount
123 Boat Sail 23
124 Boat Motor 4
125 Car Sport 3
126 Car Van 34
But I do not want any records returned where there are no products from the product table which can be removed by either a non matching ClearanceID to the Category table, or if the CategoryID is not 45 (45 identifies a clearance item) or you could if the ClearanceID is null or not 45.. does not matter.
The last two solutions from the other day, do not count and I think I may have messed up the request.