Posts

Showing posts from January, 2018

Access Queries: Date Criteria May Not Always Work with MS Access Query

Image
Learning about ms access query  is the key to a good database management system as it is the heart of any database application . There are many ways and questions to ask a database using queries and mastering the special conventions and criteria will pay dividend and avoid silly mistakes, illogical record set results and even errors. One of the more commonly used criteria and prone to errors (if misunderstood) is the date/time data type and it’s conventions. Take a look at the ms access query below showing orders before the year 2016 and the design of the query which suggested a date range from 1 st January 2016 to 31 st December 2016. The criteria for the above shows >=#01/01/2016 < #31/12/2016# which will not actually return the correct range and instead show what’s known as logical errors (dates outside the range). It’s missing the ‘And’ operator and better still adding the ‘Between’ operator will capture the correct range too. The # (hash sign) is t