Solved

Data type mismatch

Posted on 2014-04-24
3
322 Views
Last Modified: 2014-04-25
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

0
Comment
Question by:cansevin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 12

Expert Comment

by:pdebaets
ID: 40021841
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.
0
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
ID: 40021865
my guess would be
DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#))

Open in new window

DateValue() expects a string parameter, but you are passing a date data type.
0
 
LVL 29

Expert Comment

by:IrogSinta
ID: 40021921
Perhaps the problem lies in the query called qryStatsIndividual.  Can you post the SQL of that one?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question