This typically happens when a new term is being created in Banner.

The 2 places where the date needs to be corrected are SSBSECT and SSRMEET.
Could also apply to start dates.

This is meant to do bulk cleanup - the user(s) can do one-off corrections themselves.

***MAKE SURE THE USER SPECIFIES THE CORRECT DATE.

Ticket refs:
https://support.nwfsc.edu/helpdesk/tickets/12925
https://support.nwfsc.edu/helpdesk/tickets/9312


/**********************************

*** End of Term Date Correction ***

*** per Kristen Last ***

*** GT 3/27/2018 ***

**********************************/

--0a. back up SSBSECT

CREATE TABLE SSBSECT_20180712_BAK AS SELECT * FROM SSBSECT;
--DROP TABLE SSBSECT_20180308_BAK PURGE;

COMMIT;

SELECT count(*) FROM SSBSECT_20180712_BAK; --14,616
SELECT count(*) FROM SSBSECT; --14,616

--1a. UPDATE End of Term dates (SSBSECT)
UPDATE ssbsect
SET SSBSECT_PTRM_END_DATE = '14-DEC-18'
WHERE SSBSECT_TERM_CODE = 201910
AND ssbsect_crn IN ('','');

COMMIT;

--0b. back up SSRMEET
CREATE TABLE SSRMEET_20180712_BAK AS SELECT * FROM SSRMEET;
--DROP TABLE SSRMEET_20170404_BAK PURGE;

COMMIT;

SELECT count(*) FROM SSRMEET_20180712_BAK; --16,558
SELECT count(*) FROM SSRMEET; --16,558

--1b. update END_DATE CRNs (12/10/18 update to 12/14/18)
UPDATE SSRMEET
SET SSRMEET_END_DATE = '14-DEC-18'
WHERE SSRMEET_term_code = 201910
AND SSRMEET_CRN IN ('','');

COMMIT;