• Gotta stick my 2 cents in - how about this?

    update #testTable set class4 = d.class4 from

    #testTable a inner join

    ( select identifier,class4 from

    (select identifier,max(asofDate) asOfDate from #testTable group by identifier ) b

    outer apply (select class4 from #TestTable c where c.identifier = b.identifier and c.asOfDate = b.asofdate) c) d on d.identifier = a.identifier

    select * from #testtable