Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use iMartStage
- go
- select x.programid, x.enter_date, x.exit_date, x.schoolid, x.gradelevel, x.studentid, x.said
- , s.lastfirst
- , s.student_number
- , s.enroll_status
- , s.state_studentnumber
- , s.person_id
- , t.abbreviation
- , t.name
- , g.name as program_name
- from ps.spenrollments x
- join ps.students s
- on (x.studentid = s.id and x.said = s.said)
- join ps.terms t
- on (x.schoolid = t.schoolid and x.said = t.said)
- join ps.gen g
- on (g.id = x.programid and g.cat = 'specprog' and x.SAID = g.SAID)
- where 1=1
- and x.SAID = '608-PS' -- Bartow
- and t.isyearrec = 1
- and t.yearid = 28
- and x.enter_date < t.lastday
- and coalesce(x.exit_date, '9999-01-01') >= t.firstday
- and g.id = 2984 -- Bartow CCA
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement