Hello there,
I have a table with history codes and dates ex:
Name : Code : Effect_Date : Expiry_date
John S 6/4/2008 6/23/2008
john A 6/24/2008
dave A 5/6/2008 6/23/2008
dave S 6/24/2008 8/4/2008
dave A 8/5/2008 10/22/2008
dave C 10/23/2008
so basicaly Daves account was Active on 5/6/2008 up to 6/23/2008
then got suspended from 6/24/2008 to 8/4/2008 to be reactivated 8/5/2008.......
I want to be able to pull, on a fixed date (let say 5/20/2008), the status of his account after 30 days (6/20/2008, should return active), then 60 days (7/20/200, should return Suspended)
my idea was to use the Dlast funct to return the code from that table, where name=dave & Effect_date <= my above fixed date 5/20/2008 + 30 (for after 30 days), + 60 (for after 60 days)...
but it doesnt seem to work.
any Ideas?
I have a table with history codes and dates ex:
Name : Code : Effect_Date : Expiry_date
John S 6/4/2008 6/23/2008
john A 6/24/2008
dave A 5/6/2008 6/23/2008
dave S 6/24/2008 8/4/2008
dave A 8/5/2008 10/22/2008
dave C 10/23/2008
so basicaly Daves account was Active on 5/6/2008 up to 6/23/2008
then got suspended from 6/24/2008 to 8/4/2008 to be reactivated 8/5/2008.......
I want to be able to pull, on a fixed date (let say 5/20/2008), the status of his account after 30 days (6/20/2008, should return active), then 60 days (7/20/200, should return Suspended)
my idea was to use the Dlast funct to return the code from that table, where name=dave & Effect_date <= my above fixed date 5/20/2008 + 30 (for after 30 days), + 60 (for after 60 days)...
but it doesnt seem to work.
any Ideas?