I am trying to write a query that will list people who have received payments up till Jan 31th. I don't want to see people who received payments after Jan 31.
I'm missing something with my logic because it returns ppl who have payments in Jan but also after Jan 31th. Here is part of my query:
WHERE ANTY_PYMT_DT BETWEEN '2009-01-01' AND '2009-01-31'
AND ANTY_PYMT_DT NOT BETWEEN '2009-01-31' AND -2009-03-31'
03-01-09 is the last payment date that anyone would have received. But this query still pulls this one guy who has both a Jan date and a date of 03-01-09. I even tried <> '2009-03-01' and it still pulls the guy.