When I run this SQL I’m getting a Data type mismatch error. I’m at a lose as to why. The table adminsum stores the appointment date as a text value. I’m trying to convert this to a date/time value in my query. Any thoughts why I’m getting this error? When I remove the group by on the admin date field the error goes away but I want to group by the different dates. Thanks..
SELECT AdminSum.[Admin ID], Count(AdminSum.[CBSR Appointment ID]) AS [CountOfCBSR Appointment ID], AdminSum.[Site ID], CLng(Nz([Appointment Date])) AS AdminDate
FROM AdminSum
WHERE (((AdminSum.[Event Outcome]) Not Like “Candidate No-Show”))
GROUP BY AdminSum.[Admin ID], AdminSum.[Site ID], CLng(Nz([Appointment Date]))
HAVING (((AdminSum.[Admin ID]) Not Like “2007*”));