I am looking for some help and I'm new to the forum so please be gentle!
I am trying to compare two tables and need the following.
The Key value is a policy that will be used to tie the tables together.
An account number must be tied together on each table.
The most recent date value in a particular field from each table.
The most recent dates must not match (there are no issues with comparing these two dates)
One of the tables has a financial field value which must equal 0 on the most recent date row.
Table A Requirements.
Most recent date (within the last 30 days)
Table B requirements
Most recent date (in field)
Financial value on the row must be 0.
I have tried using MAX statements, exists/not exists and I'm having real trouble comparing the two. Please help!
This seems like it should be easy but I've tried all sorts of combinations and can't quite get it nailed down. I'm still returning thousands of rows and it's too much to go through manually.
Thanks in advance for any help.