Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

SQL Results showing dates before the date criteria

Hi. In the following query result I get dates in the [From] column that are before the date criteria (1 Oct 2017). What have I done wrong?

SELECT Max([vPerformanceHolesDelaysSurnames].[Date]) As [LatestDate], [vPerformanceHolesDelaysSurnames].[Shaft], [vPerformanceHolesDelaysSurnames].[Machine number], [vPerformanceHolesDelaysSurnames].[Mach Operator], Min([vPerformanceHolesDelaysSurnames].[Drilled From]) As [From], Max([vPerformanceHolesDelaysSurnames].[Drilled To]) As [To]
FROM [vPerformanceHolesDelaysSurnames]
WHERE ( [vPerformanceHolesDelaysSurnames].[Date] >= '01 Oct 2017' And [vPerformanceHolesDelaysSurnames].[Date] <= '17 Oct 2017' ) AND ( [vPerformanceHolesDelaysSurnames].[Shaft] = 'masimong air' )
 Group By [vPerformanceHolesDelaysSurnames].[Shaft], [vPerformanceHolesDelaysSurnames].[Machine number], [vPerformanceHolesDelaysSurnames].[Mach Operator]

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Pawan Kumar
Pawan Kumar
Flag of India 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
Avatar of Murray Brown

ASKER

Thanks for the help