
/* Code Fragment 6.15 Bob was removed as Associate Director of the Computer Center for 1997. */

INSERT INTO INCUMBENTS 
SELECT SSN, PCN, '01/01/1998', END_DATE
FROM INCUMBENTS
WHERE SSN = '111-22-3333'
      AND START_DATE <= '01/01/1997'
      AND END_DATE > '01/01/1998'

UPDATE INCUMBENTS 
SET END_DATE = '01/01/1997'
WHERE SSN = '111-22-3333'
      AND PCN = '999071'
      AND START_DATE < '01/01/1997'
      AND END_DATE >= '01/01/1997'

UPDATE INCUMBENTS 
SET START_DATE = '01/01/1998'
WHERE SSN = '111-22-3333'
      AND PCN = '999071'
      AND START_DATE < '01/01/1998'
      AND END_DATE >= '01/01/1998'

DELETE 
FROM INCUMBENTS
WHERE SSN = '111-22-3333'
      AND PCN = '999071'
      AND START_DATE >= '01/01/1997'
      AND END_DATE <= '01/01/1998'
