Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / April 2006

Tip: Looking for answers? Try searching our database.

data type mismatch in query criteria

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Akilah - 10 Apr 2006 19:36 GMT
I get this message when I run this query, but I run the same query with dates
between Jan and Feb and it is fine

SELECT dbo_Inspection.Inspection_Id AS [Inspection ID],
dbo_Inspection.PIH_Project AS [PIC Development Number],
dbo_Validated_Inspections.Validate_Date AS [Date of Upload],
dbo_Checklist.GTM_Modified_Date AS [Date of GTM Action],
CountBusinessDays([Validate_Date],[GTM_Modified_Date]) AS [Business Days
Between Upload and GTM Action]
FROM (dbo_Inspection INNER JOIN dbo_Validated_Inspections ON
dbo_Inspection.Inspection_Id = dbo_Validated_Inspections.Inspection_Id) INNER
JOIN dbo_Checklist ON dbo_Inspection.Inspection_Id =
dbo_Checklist.Inspection_Id
GROUP BY dbo_Inspection.Inspection_Id, dbo_Inspection.PIH_Project,
dbo_Validated_Inspections.Validate_Date, dbo_Checklist.GTM_Modified_Date,
CountBusinessDays([Validate_Date],[GTM_Modified_Date]),
dbo_Checklist.Question_No
HAVING (((dbo_Validated_Inspections.Validate_Date) Between #3/1/2006# And
#4/1/2006#) AND ((dbo_Checklist.Question_No)="FINAL"))
ORDER BY dbo_Validated_Inspections.Validate_Date,
dbo_Inspection.Inspection_Id;

Please help
Tom Ellison - 10 Apr 2006 20:34 GMT
Dear Akilah:

Temporarily, remove parts of the query until the error goes away.  Start
perhaps with the WHERE and HAVING clauses, and the ORDER BY clause.

When you write a query of any size, just write it a bit at a time and run a
quick test.  This not only helps isolate any errors you might make, but it
also isolates performance problems and other logical errors.

Tom Ellison

>I get this message when I run this query, but I run the same query with
>dates
[quoted text clipped - 21 lines]
>
> Please help
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.