These new cohort codes have been in use since Fall semester 2017 (201810).

The last request for new codes and attaching them to students was on 10/29/2018 (ticket: https://support.nwfsc.edu/helpdesk/tickets/16531)

This is tricky because there can be more than 1,000 IDs in the IN clause, so the Excel concatenate function is included here for reference to generate the SQL based on IR student records.


The new term cohort codes need to be added to STVCHRT before the student records are modified in SGRCHRT.

All INSERTS plus some sample data are listed here.




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

*** new cohort inserts for 201910 (IR) ***

*** GT 10.29.2018                                 ***

*** Ticket: https://support.nwfsc.edu/helpdesk/tickets/16531

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

--1a. Insert new cohort code #1

INSERT INTO STVCHRT

(STVCHRT_CODE,STVCHRT_DESC,STVCHRT_ACTIVITY_DATE)

VALUES

('FTIC19CR','Completion and Retention 2019',SYSDATE);

COMMIT;

--1b. Insert new cohort code #2

INSERT INTO STVCHRT

(STVCHRT_CODE,STVCHRT_DESC,STVCHRT_ACTIVITY_DATE)

VALUES

('FTIC19R','Retention 2019',SYSDATE);

COMMIT;

--2a. Attach cohort info to student records (Excel concat)

=CONCATENATE("INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(",A2,",",B2,",'",C2,"',SYSDATE);")

--2b. Attach cohort info to student records (sample SQL)

INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(2010103,201910,'FTIC19CR',SYSDATE);

INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(2010114,201910,'FTIC19CR',SYSDATE);

INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(2010813,201910,'FTIC19CR',SYSDATE);

INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(2010828,201910,'FTIC19R',SYSDATE);

INSERT INTO SGRCHRT

(SGRCHRT_PIDM,SGRCHRT_TERM_CODE_EFF,SGRCHRT_CHRT_CODE,SGRCHRT_ACTIVITY_DATE)

VALUES(2011542,201910,'FTIC19R',SYSDATE);

COMMIT;