SELECT ispass=case
when Result.StudentRseult >=60 then 1
else 0
END
FROM Result WHERE ExamDate="2012-01-01" AND SubjectNo为什么在when Result.StudentRseult >=60 then 1这一句的StudentResult会出现列明无效的错误!
when Result.StudentRseult >=60 then 1
else 0
END
FROM Result WHERE ExamDate="2012-01-01" AND SubjectNo为什么在when Result.StudentRseult >=60 then 1这一句的StudentResult会出现列明无效的错误!
select * from sys.columns where object_id=object_id('Result')看看有没有这个字段
2、select * from sys.columns where object_id=object_id('Result' 这个是查找这个表有什么列
去掉也提示列名无效,那你用小李子的
select * from sys.columns where object_id=object_id('Result')查询下看看Result表有没有这个列名