Hello,
I'm trying to create a query that will show me customers with late contracts.
I want to include all contracts up to the current date minus one month.
I've searched the forums and come up with a few options none of which are giving me the results I need.
WHERE al.DELVPERIOD_FROM <= (trunc(sysdate, 'MM')-1) and also
WHERE al.DELVPERIOD_FROM < (trunc(sysdate, 'MM'))
These appeared to work at first but I late found that many contracts I would expect to find are missing. I'm not sure why this is. For example, a customer's late contracts from 10/1/16 are not included but the same customer will have late contracts from 2/1/17 included. Other customers will have late contracts from 10/1/16 included however.
Any help is very appreciated.
Thank you