SQL to pull in custom fields from StoredGrades

I simply cannot get my custom field StoredGrades info to pull up with this. There is data in there, but I cant convince it to come out via SQL . Everything else comes up fine.
I never have problems with 'students' never tried StoredGrades before..

Select s.studentid,s.termid,s.course_name,
ps_customfields.getcf('storedgrades',s.dcid,'AB_Final_Mark')Final
From StoredGrades s

Where Schoolid=519
and s.grade_level=12
and s.termid>2200
Order by SchoolName

AB_Final_Mark is not a custom field. You should use:

Select s.studentid,s.termid,s.course_name,AB_Final_Mark Final
From StoredGrades s
Where Schoolid=519
and s.grade_level=12
and s.termid>2200
Order by SchoolName

Subscribe to Comments for "SQL to pull in custom fields from StoredGrades"