SQL problem pulling Ohio state fields

I have a problem with the following SQL coding and I can't figure out why my ohio state fields won't pull. Can someone help me here? PLEASE!
I'm trying to pull the EMIS Subject Core Area, the EMIS Subject Code and the CTE College Credit fields. What is wrong with this code? It worked before!

SELECT s.student_number.s.last_name, s.first_name, s.middle_name, s.state_studentnumber, s.grade_level, s.gender, s.enroll_status,
sg.course_number, sg.course_name, sg.teacher_name, sg.grade "Letter Grade",
sg.percent, sg.storecode, sg.absences, sg.tardies, sg.termid, sg.potentialcrhrs, sg.earnedcrhrs, ps_customfields.getStudentscf(s.id,'HS') AS HomeSchool,ps_customfields.getStudentscf(s.id,'next_year_program') AS next_year_program,ps_customfields.getcf ('courses', co.id, 'OH_Core_Area') "EMIS Subject Area of Credit",
ps_customfields.getcf ('courses', co.id, 'OH_Core_Area') "EMIS Subject Core Area",
ps_customfields.getcf ('courses', co.id, 'OH_Subject_Code') "EMIS Subject Code",
ps_customfields.getcf ('courses', co.id, 'OH_CTE_College_Credit') "CTE College Credit"

FROM students s
JOIN storedgrades sg
ON s.id=sg.studentid
JOIN Terms
ON sg.termid=terms.id
and sg.schoolid=terms.schoolid
JOIN courses co
ON sg.course_number=co.course_number
WHERE s.schoolid=062117
AND sg.termid>=2700
AND sg.storecode='S1'
ORDER BY s.grade_level, s.last_name

pogacsnik@mcjvs.edu

Subscribe to Comments for "SQL problem pulling Ohio state fields"