We have a history table, which is defined as follows:
--ID (pk) -----------Object ID--------------Work ID--------date------ 1 1111 AAAA 1/1/2010 2 1111 AAAA 1/2/2010 3 2222 BBBB 1/1/2010 4 3333 CCCC 1/1/2010 5 1111 DDDD 1/3/2010
We need the last (non-ID-based) line of the PER Work ID. Please note that an object identifier can have several work identifiers, and we need the last work identifier for EACH.
What we need as our result set:
ID (pk) -----------Object ID--------------Work ID--------date------ 2 1111 AAAA 1/2/2010 3 2222 BBBB 1/1/2010 4 3333 CCCC 1/1/2010 5 1111 DDDD 1/3/2010
Thoughts / Ideas?
source share