SQL Server 2005
I feel dumb for asking this but I can't figure it out. I need help to iterate through an employee status table and select only the most current record either using a View or SP.
Ex.
Name Status Effective Date
Sally Someone H2 11/03/2006
Sally Someone H1 09/15/2005
Norm Noone H1 03/23/2003
Nick Anyone H2 02/21/2000
How whould I limit the result set only the most current Effective Date so as to get the current status. They don't override the status field in this table, they had a new record whenever someone changes status.
thanks
I feel dumb for asking this but I can't figure it out. I need help to iterate through an employee status table and select only the most current record either using a View or SP.
Ex.
Name Status Effective Date
Sally Someone H2 11/03/2006
Sally Someone H1 09/15/2005
Norm Noone H1 03/23/2003
Nick Anyone H2 02/21/2000
How whould I limit the result set only the most current Effective Date so as to get the current status. They don't override the status field in this table, they had a new record whenever someone changes status.
thanks