I need to combine two rows if the status code of the second row is Terminated:
PID StartDate StatusEndDate Status
1234 5/16/2001 ACTIVE
1234 1/14/2005 TERMINATED
5678 3/16/2002 ACTIVE
5678 7/6/2004 TERMINATED
In the aboove case I would like to create a single record so that it looks like:
PID StartDate StatusEndDate Status
1234 5/16/2001 1/14/2005 ACTIVE
5678 3/16/2002 7/6/2004 ACTIVE
Can anyone suggest the best way of doing this.
PID StartDate StatusEndDate Status
1234 5/16/2001 ACTIVE
1234 1/14/2005 TERMINATED
5678 3/16/2002 ACTIVE
5678 7/6/2004 TERMINATED
In the aboove case I would like to create a single record so that it looks like:
PID StartDate StatusEndDate Status
1234 5/16/2001 1/14/2005 ACTIVE
5678 3/16/2002 7/6/2004 ACTIVE
Can anyone suggest the best way of doing this.