I want to filter expiration dates by dates after the current date. The problem is that the current data's date is in three columns; exp0year
, exp0mo
and exp0da
.
I have tried to put multiple where clauses, the problem with say exp0mo > 4
disqualifies a date like 1/1/2020
.
Select exp0yr,exp0mo,exp0da,policy0num,zip0post,add0line01,add0line03,add0line04,profit0ctr
from ni.pmsp0200
where exp0yr>118 and exp0mo>04 and exp0da>20 and profit0ctr='eoh'
group by exp0yr,exp0mo,exp0da,policy0num,zip0post,add0line01,add0line03,add0line04,profit0ctr
I expected to get dates after 05/21/2019
but instead got all of those date except from 01/01/2020
-05/20/2020
.