不要用INNER JOIN bbs.dbo.VIEW1
换成LEFT join 
部分地方要修改和添加update g set g.GRAGE_INTERCHANGE=(case when v.T_NO>25 then 50 else 2*v.T_NO end)+(case when v.R_NO>50 then 50 else v.R_NO end) *
(CASE isnull(v.M_NAME,'') when '' then 0 else 1 end)    
--因为是LEFT JOIN ,所以当某学生信息不在于assignment.dbo.HW_STUDENTS内时,M_Name的关----联值将取NULL,"when '' then 0 else 1" 乘上前面的成绩就是结果,要么等于0,要么不变
from assignment.dbo.HW_STUDENTS s INNER JOIN 
assignment.dbo.HW_CLASS c ON  
s.CLASS_ID = c.CLASS_ID INNER JOIN 
assignment.dbo.HW_STUDENTGRADE g ON 
s.STUDENTS_NO = g.STUDENTS_NO LEFT JOIN bbs.dbo.VIEW1 v   --换成LEFT JOIN
on g.STUDENTS_NO=v.M_NAME and v.CAT_NAME=g.COURSE_NAME 
where c.CLASS_NAME=' 计算机一班' and 
g.COURSE_NAME=' 计算机基础 '