AnsweredAssumed Answered

How can I write a definition query for feature classes to divide a larger table by year?

Question asked by monkey72 on Jan 15, 2019
Latest reply on Jan 15, 2019 by monkey72

My source data is a set of annual tables that have been merged into one.  

 

If I use these definition queries, only the first one works.  Is there an error in my SQL statement?

 

Status = 'Completed' AND Delivery_Date > date '2018-01-15 00:00:00'
Status = 'Completed' AND Delivery_Date < date '2018-01-15 00:00:00' AND Delivery_Date > date '2017-01-15 00:00:00'
Status = 'Completed' AND Delivery_Date < date '2017-01-15 00:00:00' AND Delivery_Date > date '2016-01-15 00:00:00'
Status = 'Completed' AND Delivery_Date < date '2016-01-15 00:00:00' AND Delivery_Date > date '2015-01-15 00:00:00'
Status = 'Completed' AND Delivery_Date < date '2015-01-15 00:00:00' AND Delivery_Date > date '2014-01-15 00:00:00'
Status = 'Completed' AND Delivery_Date > date '2014-01-15 00:00:00'
The data works fine as separate feature classes.  My client requested I do it this way.

Outcomes