Good Day Gentelmen!
How do i include ' NULL' Values in this expression???
where gg.timemodified>0
Thanks
WHERE (gg.timemodified>0 OR gg.timemodified IS NULL)
@TIM
Thank you for the help, i tried that syntax to show the NULL grades but didn't work.
ROUND(gg.finalgrade,2) AS Grade, ... anything i am missing here? i just want to see Null grades as well.
Thanks,
John Sam
Can you post here the full sql query?
Here it is, it doesn't show the NULL finalgrades.
______________________________________________________________
SELECT co.fullname as 'Course', u.username as 'Emp ID', u.country as 'Location', u.firstname, u.lastname, ROUND(gg.finalgrade,2) AS Grade, FROM_UNIXTIME(ra.timemodified,'%D %M %h:%i:%s %x') AS Enrol_time
FROM prefix_role_assignments ra,
prefix_user u, prefix_context c, prefix_course co, prefix_grade_grades gg, prefix_grade_items gi, prefix_course_categories cc
WHERE ra.contextid = c.id AND c.instanceid = co.id AND c.contextlevel = 50 AND ra.userid = u.id AND u.deleted = 0 AND gg.userid = u.id AND gi.itemtype = 'course' AND cc.id = co.category AND gi.courseid = co.id AND gi.id = gg.itemid
%%FILTER_COURSES:co.id%% %%FILTER_STARTTIME:ra.timemodified:>%% %%FILTER_ENDTIME:ra.timemodified:<%% %%FILTER_USERS:u.country%%
This query should show NULL final grades (if they are present in tables)
Please, try to change this:
ROUND(gg.finalgrade,2) AS Grade
for
gg.finalgrade AS Grade
Regards