-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create V1.0.52__DDL-REPLACE_VIEW-REPORT_GRAD_STUDENT_DATA_VW.sql
GRAD2-2280 - GRAD P3: Deceased (DEC) students should not be included in Monthly or Year End Distributions
- Loading branch information
1 parent
2fc058a
commit a63d76b
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...main/resources/db/migration/1.0/V1.0.52__DDL-REPLACE_VIEW-REPORT_GRAD_STUDENT_DATA_VW.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
CREATE OR REPLACE VIEW REPORT_GRAD_STUDENT_DATA_VW AS | ||
SELECT | ||
A1.GRADUATION_STUDENT_RECORD_ID, | ||
A1.SCHOOL_OF_RECORD MINCODE, | ||
A1.SCHOOL_AT_GRADUATION MINCODE_AT_GRAD, | ||
SUBSTR(A1.SCHOOL_OF_RECORD, 0, 3) DISTRICT_CODE, | ||
SUBSTR(A1.SCHOOL_AT_GRADUATION, 0, 3) DISTRICT_CODE_AT_GRAD, | ||
A1.UPDATE_DATE, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.pen' RETURNING VARCHAR2(10) DEFAULT 'error' ON ERROR) PEN, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.legalFirstName' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) FIRST_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.legalMiddleNames' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) MIDDLE_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.legalLastName' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) LAST_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.studentGrade' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) GRADE, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStudent.studentStatus' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) STATUS, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.districtName' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) DISTRICT_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.schoolName' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.address1' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_ADDRESS1, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.address2' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_ADDRESS2, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.city' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_CITY, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.provCode' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_PROVINCE, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.countryName' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_COUNTRY, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.school.postal' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) SCHOOL_POSTAL, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradProgram.programCode' RETURNING VARCHAR2(64) DEFAULT 'error' ON ERROR) PROGRAM_CODE, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradProgram.programName' RETURNING VARCHAR2(128) DEFAULT 'error' ON ERROR) PROGRAM_NAME, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStatus.programCompletionDate' RETURNING VARCHAR2(10) DEFAULT 'error' ON ERROR) PROGRAM_COMPLETION_DATE, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.gradStatus.honoursStanding' RETURNING VARCHAR2(10) DEFAULT 'error' ON ERROR) HONORS_STANDING, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.graduated' RETURNING VARCHAR2(10) DEFAULT 'error' ON ERROR) IS_GRADUATED, | ||
JSON_VALUE(A1.STUDENT_GRAD_DATA, '$.studentCertificatesTranscript.transcriptTypeCode' RETURNING VARCHAR2(16) DEFAULT '' ON ERROR) TRANSCRIPT_TYPE_CODE, | ||
JSON_QUERY(A1.STUDENT_GRAD_DATA, '$.studentCertificatesTranscript.certificateTypeCodes') CERTIFICATE_TYPE_CODES, | ||
JSON_QUERY(A1.STUDENT_GRAD_DATA, '$.nonGradReasons') NON_GRAD_REASONS | ||
FROM | ||
API_GRAD_STUDENT.GRADUATION_STUDENT_RECORD A1 | ||
WHERE A1.STUDENT_STATUS_CODE NOT IN ('TER', 'DEC') | ||
|
||
; | ||
|
||
|