Do the items in your TABLE2 have a 1 to 1 relationship with the SUBCODE in your TABLE1?
In other words could you have something like:
Code:
Table1
TopCode SubCode Item
ABC ABC BLAHBLAH
ADF ABC BLAHBLAH
if so how are you linking the two tables?
Is it possible in TABLE2 to have:
Code:
Table2
SubCode SubCodeDate
ABC 1/1/2001
ABC 1/15/2001
ABC 1/1/2011
You seem to say in your original post that you want to pick out the most recent record if so then I have to assume your TABLE2 can have multiple records for each subcode?