I am trying to select the MAX date and the revenue amount that corresponds with that date that is less than a date specified.
nID nRevAmt
----------- ----------- ---------------------------
45 0 2001-02-10 00:00:00
45 3628 1999-10-05 00:00:00
45 3810 1999-10-28 00:00:00
45 4335 1999-11-16 00:00:00
45 4603 2000-12-01 00:00:00
45 4755 1999-11-24 00:00:00
If I enter a date of 2000-12-25 I want the following record returned:
nID nRevAmt
----------- ----------- ---------------------------
45 4603 2000-12-01 00:00:00
Thanks
Jeff
nID nRevAmt
----------- ----------- ---------------------------
45 0 2001-02-10 00:00:00
45 3628 1999-10-05 00:00:00
45 3810 1999-10-28 00:00:00
45 4335 1999-11-16 00:00:00
45 4603 2000-12-01 00:00:00
45 4755 1999-11-24 00:00:00
If I enter a date of 2000-12-25 I want the following record returned:
nID nRevAmt
----------- ----------- ---------------------------
45 4603 2000-12-01 00:00:00
Thanks
Jeff