- Joined
- May 15, 2016
- Messages
- 1
- Reaction score
- 0
So, I have this VERY important database management assignment, which is currently driving me crazy. In the assignment, I am asked to run a number of queries, one of which is a count query. I did the usual : selected query design, chose my tables and fields, clicked the E-like symbol etc. After changing 'Grouped by' to 'Count', I wrote the criteria. I am supposed to count all sponsors from the Gold category. So under 'Category of Sponsor' I wrote 'gold' for the criteria. When I clicked Run, I received the error 'Data Type Mismatch in Criteria Expression'. I cannot, for the life of me, solve this problem. I've checked the data type for 'Category of Sponsor', and it IS text. Apparently, the quotation marks will mean its text, which it is, so what's the problem? Is Count only for numerical values?
If so, how will I count this:
in order to receive how many times 'Gold' occurs under Category of Sponsor, and counting how many Gold sponsors I have?
Here is my sql:
SELECT Count(Sponsor.[Sponsor Name]) AS [CountOfSponsor Name]
FROM Sponsor
HAVING (((Count(Sponsor.[Category of Sponsor]))='gold'));
Please explain to me like I'm a three year old, I'm a complete newb.
If so, how will I count this:
Here is my sql:
SELECT Count(Sponsor.[Sponsor Name]) AS [CountOfSponsor Name]
FROM Sponsor
HAVING (((Count(Sponsor.[Category of Sponsor]))='gold'));
Please explain to me like I'm a three year old, I'm a complete newb.