When a TEM Manager is replaced, the Banner table FTOBPROF needs to be updated, replacing the old TEM Manager's pidm  with the new employee's pidm. This requires quick turn-around so as not to cause data errors in Banner Finance.

*Note: This usually requires that a temporary manager be added pending the new hire.



--0a. Back Up FTOBPROF

CREATE TABLE FTOBPROF_20181206_BAK AS SELECT * FROM FTOBPROF;


--0b. examine FTOBPROF records 

SELECT * FROM FTOBPROF;

--1. Get PIDM of old/new TEM Manager

SELECT * FROM spriden

WHERE spriden_id = 'N01980828';

--2040474 N02023073 Trolian Catherine

--1999132 N01979132 Adams Tamara

--2302441 N19021716 Lauren Roberts

--2000725 N01980828 Wendy Ates

--2. Identify the set to be updated

SELECT * FROM FTOBPROF

WHERE APPROVER_PIDM IS NOT NULL;

--649

--3. update the old manager pidm to the new (or temp) manager pidm

UPDATE FTOBPROF

SET APPROVER_PIDM=2000725

WHERE APPROVER_PIDM=2302441;

--WHERE APPROVER_PIDM IS NOT NULL

COMMIT;