Download SCT Banner Technical Student Technical Training Workbook

Transcript
Section M: General Student
Lesson:
Self Check – General Student
Exercise – Answer Key
Exercise
Write a query that returns the student’s full name, id, advisor’s name, major code, and residency
code from the current student record.
select substr(S.spriden_last_name, 1,15) || ', ' ||
substr(S.spriden_first_name,1,15),
S.spriden_id, sgbstdn_majr_code_1,
sgbstdn_resd_code,
substr(A.spriden_last_name, 1,15)
from spriden S, spriden A, sgbstdn, sgradvr
where sgradvr_pidm = S.spriden_pidm
and S.spriden_change_ind is null
and sgradvr_term_code_eff =
(SELECT MAX(I.SGRADVR_TERM_CODE_EFF)
FROM SGRADVR I
WHERE I.SGRADVR_TERM_CODE_EFF <= '&term'
AND SGRADVR_PIDM = I.SGRADVR_PIDM)
and sgradvr_pidm = sgbstdn_pidm
and sgbstdn_term_code_eff =
(SELECT MAX(B.SGBSTDN_TERM_CODE_EFF)
FROM SGBSTDN B
WHERE B.SGBSTDN_TERM_CODE_EFF <= '&term'
AND SGBSTDN_PIDM = B.SGBSTDN_PIDM)
and sgradvr_advr_pidm = A.spriden_pidm
and A.spriden_change_ind is null
© SunGard 2004-2005
Student Technical
Page 174