易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL语句 - MS-SQL Server / 基础类

将学生选课成绩从百分制改为等级制(即A、B、C、D、E五级)。
使用存储过程
SQL code:
select case
when score >=0 and score<20 then 'E'
when score >=20 and score<40 then 'D'
when score >=40 and score<60 then 'C'
when score >=60 and score<80 then 'B'
else 'A'


select case
when (score-20)/20=0 then 'e'
when (score-20)/20=1 then 'd'
when (score-20)/20=2 then 'c'
when (score-20)/20=3 then 'b'
when (score-20)/20=4 then 'a' end

from tb

SQL code:
select
case
when score score>80 then 'A'
when score score<60 then 'B'
when score score<40 then 'C'
when score score<20 then 'D'
else 'E'
end
from tb


SQL code:
select
case
when score score>=80 then 'A'
when score score>=60 then 'B'
when score score>=40 then 'C'
when score score>=20 then 'D'
else 'E'
end
from tb
楼上手误,修正

SQL code:


相关问答:

csv文件转换成sql导入到数据库,没有数据为何?

执行的顺序:
1)文件浏览框(选择文件使用)
选择好文件后
点击一个导入按钮的时候 ,把上面上传框里的csv文件以一个ID为文件名,上传到**/**文件夹下
2)读取这个文件夹下的csv的文件,转换成sql
3 ......

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

MS SQL作业问题 - MS-SQL Server / 应用实例

如何在SQL2005中设定定时作业,比如说定时清理某些表的数据,
或者是定时的将某些表的数据导出excel!
在线等待,急急急,最好是详细步骤!
之前我做的作业有点问题!
帮UP

参考:http://hi.baidu.com/toiota ......

求一SQL - MS-SQL Server / 基础类

tab1 字段:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 字段:goodsid,goodskind(商品类型)
tab3 字段:goodskind(商品类型),kindname
结果:
得到商品类型在一段时间 ......

求一个SQL语句 - MS-SQL Server / 基础类

字段1,字段2.....字段N,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
想要的结果是:
1,Na ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号