AnsweredAssumed Answered

Multiple records - find latest

Question asked by CRM114 on Apr 15, 2013
Latest reply on Apr 15, 2013 by philmodjunk

Title

Multiple records - find latest

Post

     Hello -

     I have a database with 188,000 rows.  Each record includes a person's ID number and a year in which the record was recorded (along with 50 or so other fields).  

     Example of a person with 3 records:

     ID                Year

     1144           2001

     1144          2002

     1144          2003

      

     A person could have just one record.  A person could have 1 to 10 records since this database covered 10 years.   I need to pull one record per person containing the latest year.  In the above example, the record for 2003 would be marked or extracted.

     I'm racking my brain trying to figure this out.  I tried some scripting with setting a variable for the id and year and then looking at the next r ecord and comparing.  But I ended up not exactly sure of the logic I was creating.  

      

      

Outcomes