I have a two columns named "Statement Date" and "Account Number". For some account numbers statements are uploaded monthly, for some quarterly and for some annually and the date on which these statements are uploaded is saved in "statement date"
I want to check if for a particular a statement is uploaded or not. For e.g- "account number"-2345426576 "statement date"-5/30/2016, I have to check if there is entry for previous month(4/30/2016) and next month(6/30/2016). If entry is absent then it should return missing for that month.
If dates are to be compared of different tables and then find if a statement is missing or not.i.e if t1.date>t2.date then check t1.date is how many month greater. Same goes if t1.date