Link to home
Start Free TrialLog in
Avatar of cansevin
cansevin

asked on

Data type mismatch

I am trying to run the following query. I keep getting "Data Type Mismatch"

Any ideas? Thanks!

SELECT Sum(qryStatsIndividual.MessagesRecorded) AS SumOfMessagesRecorded, Sum(qryStatsIndividual.TotalNewClients) AS SumOfTotalNewClients, Sum(qryStatsIndividual.BookedTrue) AS SumOfBookedTrue, Sum(qryStatsIndividual.TalkedTo) AS SumOfTalkedTo, Sum(qryStatsIndividual.PercentBooked) AS SumOfPercentBooked, Sum(qryStatsIndividual.FiveMinCallBack) AS SumOfFiveMinCallBack, Sum(qryStatsIndividual.PercentinFive) AS SumOfPercentinFive, "ADAY" AS DateSpec, DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#)) AS Expr1
FROM qryStatsIndividual
GROUP BY "ADAY", DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#))
HAVING (((DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#)))=DateValue(Now())));

Open in new window

Avatar of pdebaets
pdebaets
Flag of United States of America image

I wonder if you might be trying to sum a text field here

Sum(qryStatsIndividual.TalkedTo) AS SumOfTalkedTo

?

If that's not it, make a copy of your query, then remove one column at a time until you find the column that is causing the problem. then check the data type of the field in that column.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Perhaps the problem lies in the query called qryStatsIndividual.  Can you post the SQL of that one?