Let's say we have two tables A and B. Both tables have From Dates .i.e. A.FromDate and B.FromDate and both can be joined on MemberID. I need to pull a list of members from table with following condition on From Date
FromDate should be calculated: • If A.FromDate is less than B.FromDate, use the B.FromDate • If A.FromDate is equal to or greater than current group span B.FromDate , use the eligibility span A.FromDate • If dates cannot be determined, member should be included on an exception list.
Please Help