where table1.Date < systemDateGet() - table2.Days
date = systemDateGet() - table2.Days where table1.Date < date