Here's the example... I have a 3 rows for an employee with the following effective dates:
11/2/09
6/8/09
7/7/08
If I enter 10/1/09, I expect to get the 6/8/09 row...
If I enter 05/01/08, I expect to get the 7/7/08 row...
If I enter 11/6/09, I expect to get the 11/2/09 row...
I was hoping the logic below would get me there, but it doesn't. When I validate the code below, I don't get any errors; however, when I run the query I get... "An error occurred while performing operation 'sqlPrepareWithOptions' status='-16'. "
If ([Effective Date] <= ?Input date?) THEN ([Effective Date]= maximum([Effective Date] for [Employee Number])) ELSE ([Effective Date]= minimum([Effective Date] for [Employee Number]))