"Give me every newly entering student for this term — freshmen, transfers, re-admits, certificate, and non-declared — who is confirmed enrolled, so we can provision their Adobe accounts before the semester starts."
This is meant to run before the term begins, while A_CC_V3.sql runs once courses are underway and enrollment is populated.
This is the incoming/new student provisioning query — it targets students who are newly entering the institution rather than pulling from course enrollment like the other two queries. It's the "onboarding" counterpart to A_CC_V3.sql.
The fundamental difference is the data source. Instead of starting from SR_COURSE_SECTION and working backward to students, this query starts from AT_ADMI_TERM — the admissions table — and works forward.
A_CC_V3.sql |
ACC_INCOMING.sql |
|
|---|---|---|
| Anchor table | SR_COURSE_SECTION |
AT_ADMI_TERM |
| Who it finds | Students enrolled in courses | Students admitted/entering this term |
| Key filter | TUIT_ID (UG vs Grad) |
ETYP_ID (entry type) |
| Join style | Mostly LEFT JOINs | INNER JOINs for core tables |
| Name source | CO_NAME via enrollment |
CO_NAME aliased as STUD directly |
UNIQUE |
Present | Absent |
This is the heart of the query. The comment explains it well:
AND ADMI.ETYP_ID IN ('FI','FO','NF','RA','TR','TS','CT','ND')
| Code | Meaning |
|---|---|
FI |
First-time freshman (in-state?) |
FO |
First-time freshman (out-of-state?) |
NF |
New freshman |
RA |
Re-admit |
TR |
Transfer |
TS |
Transfer (second type) |
CT |
Certificate student |
ND |
Non-declared |
The ADST_ID IN ('EN') filter narrows to only enrolled admitted students — so accepted-but-not-enrolled applicants are excluded.
The extra address join — there's a ADDR2 join on ADTY_ID = 'PERM' (permanent address) that is joined but never used in the SELECT. Likely a leftover from a prior version or future intention.
INNER JOINs instead of LEFT JOINs — the core joins (CO_NAME, SR_STUDENT, SR_STUDENT_TERM, CO_USER) are all INNER, meaning a student must exist in all four tables to appear. This is stricter than the enrollment query and means students missing a user account or degree record will be silently excluded.