Try this:
select course.courseid, courseinstruc.instructor, sum(tempcourse.stdcount) as stdtotal;
from course left join courseinstruc on course.courseid = courseinstruc.courseid,;
tempcourse;
where course.courseid = tempcourse.courseid and !empty(courseinstruc.instructor);
into table temporary
group by courseinstruc.instructor
Then do:
select course.courseid, courseinstruc.instructor, sum(tempcourse.stdcount) as stdtotal;
from course left join courseinstruc on course.courseid = courseinstruc.courseid,;
tempcourse;
where course.courseid = tempcourse.courseid and empty(courseinstruc.instructor);
into cursor temporary2
group by course.courseid
Then just append the results from one query on the end of the other query.
Like:
sele temporary
appe from temporary2
Rip Ryness
International Falls, MN