select a.kc as id ,rtrim(b.kc) as subject,
(case when c.subject is null then 0 else 1 end) as subsel ,
(case when c.[FULL] is null then a.[full] * 0.8 else c.good end) as good
from nj_kc a join dm_kc b on a.kc=b.id left join examsubject c on c.exam=5 and a.kc=c.subject
where a.nj=17
(case when c.subject is null then 0 else 1 end) as subsel ,
(case when c.[FULL] is null then a.[full] * 0.8 else c.good end) as good
from nj_kc a join dm_kc b on a.kc=b.id left join examsubject c on c.exam=5 and a.kc=c.subject
where a.nj=17
解决方案 »
- 求助,检查datetime
- 请教一个SQL问题,在线等
- 请问“SQL Server与windows”和“windows”这两种身份验证方式到底有什么区别?
- 如何把另一个数据库的表的数据导入到这个数据表里
- 【吐血请教】sql查询语句
- 可以把远程sql server上的数据库直接备份到本地吗?
- 同一个表中计算时间差(计算出花了多少个小时)
- 心里没底,总觉得这样写sql语句不规范,数据库大了会很慢,请各位爷看看。
- sql数据库安全问题
- 试题抽取程序怎么做才能效率最高?
- 如何在网页中上传图片文件到数据库(SQL Server2000)中,并将其显示出来?请帮助!
- 如何用ASP建立两个数据库中的表的关联
对,是我搞错了,是因为“)”是全角的关系,怎么会犯这种错误呢!结贴,给分。