Will J Douglas Posted May 4, 2021 Share Posted May 4, 2021 Hi, I've filtering a report to reduce the data return as we've hit the row limit of 10,000. When I apply they filter it doesn't seem to work. This is the filter. I've tried various combinations of date format (e.g 01/01/2020, 2020/01/01) but it doesn't seem to work. The date I'm getting back still contains requests logged in 2019 I've tried using between clause, a greater and less than clause, a like %2020% clause but none seem to be working. Regards, Will. Link to comment Share on other sites More sharing options...
Alberto M Posted May 4, 2021 Share Posted May 4, 2021 @Will J Douglas, did you tried this date format? Link to comment Share on other sites More sharing options...
Will J Douglas Posted May 4, 2021 Author Share Posted May 4, 2021 Hi @Alberto M Yes I tried 2020-01-01 and also 01-01-2020 and neither format worked. Regards, Will. Link to comment Share on other sites More sharing options...
Victor Posted May 4, 2021 Share Posted May 4, 2021 @Will J Douglas try: Greater than: 2020-01-01 00:00:00 Less than: 2021-01-01 00:00:00 Link to comment Share on other sites More sharing options...
Will J Douglas Posted May 4, 2021 Author Share Posted May 4, 2021 @Victor Still not working. Link to comment Share on other sites More sharing options...
Victor Posted May 4, 2021 Share Posted May 4, 2021 @Will Douglas is that the only criteria in filter? Link to comment Share on other sites More sharing options...
Will J Douglas Posted May 4, 2021 Author Share Posted May 4, 2021 @Victor Full criteria is Link to comment Share on other sites More sharing options...
Victor Posted May 4, 2021 Share Posted May 4, 2021 @Will J Douglas right, the operator precedence issue... https://stackoverflow.com/questions/1241142/sql-logic-operator-precedence-and-and-or Your report is actually returning all results where team is "Maintenance". Because of how AND/OR precedence works. First, the team criteria needs to be put in brackets (because of the OR): ( team name LIKE 'maintenance team%' OR team name = 'Maintenance (Accomodation)' ) Second, the year for "date less than" is wrong, it needs to be 2021. Link to comment Share on other sites More sharing options...
Will J Douglas Posted May 5, 2021 Author Share Posted May 5, 2021 @Victor Many thanks, I hadn't noticed the Add ( or Add ) buttons nor realised my mistake. I've tested and its all working okay now. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now