SQL query and if statement
Posted on 2014-03-03
In my where statement I need to check two areas, if the first isn't populated, check the other.
if a.C_EFF_DT is NOT NULL then a.C_EFF_DT < date(current date - 6 months)
if a.C_EFF_DT is NULL then b.C_EFF_DT < date(current date - 6 months)
So basically if the first C_EFF_DT is null then check the second C_EFF_DT, if it has a date, then check it and don't worry about the second date.