SQL数据库中Case End语句应用总结
来源:互联网 发布:2017年猝死的程序员 编辑:程序博客网 时间:2024/06/04 18:09
Select PR_PT.cTmpCode,max(PR_PT.cTmpName) as cTmpName,max(PR_PT.cDescription) as cDescription,case when exists(select * from PR_StuPrintRecord S where S.cTmpCode = PR_PT.cTmpCode and S.cStuCode='20122015') then (select count(*) from PR_StuPrintRecord SPR where SPR.cTmpCode= PR_PT.cTmpCode and SPR.cStuCode='20122015' ) else 0 end as iPrintTimes,max(iPrintLimitTimes) as iLimitTimes From PR_PrintTemplate PR_PT group by PR_PT.cTmpCode order by PR_PT.cTmpCode 根据学号对不同的打印模块进行打印次数统计,如果该学号的某打印模块尚未打印显示为0,否则显示
相应的打印次数。
- SQL数据库中Case End语句应用总结
- 数据库中case...when...then...end语句的使用
- mysql数据库中case...when...then...end语句的使用
- Sql语句-case when then else end
- sql语句的case-end语句的疑似bug经历
- sql语句中的判断语句case when else end
- SQL中条件语句decode与case...when...else...end的用法
- 对SQL语句中case when...then...else...end的理解
- sql查询中case when...else...end
- Oracle-Sql 语句中 Case When 的应用
- oracle case end语句
- sql数据库 转 Access SQL语句改写之 Case When Then When Then Else End 修改篇
- case when then...else end sql 语句用法
- SQL的Case When ... Then ... Else ... End... 语句
- SQL的case when then else end语句的用法
- 项目中用到的sql语句(case when...then... end )
- Sql 语句中case使用
- SQL中CASE...WHEN语句
- ASP生成数字相加求和的BMP图片验证码
- C++ 构造析构的顺序
- UML建模之时序图(Sequence Diagram)
- PHP之 字符串连接方法
- Stream 对象表示二进制数据或文本的流。
- SQL数据库中Case End语句应用总结
- UML建模之业务处理模型(Business Process Model,BPM)
- asp.net RadGrid分页功能扩展Demo
- linux c/c++ vc++ 6.0的open按钮不好使 ,一打开就关闭
- 深入浅出编译原理-1-C语言的文法
- VB 应用类
- UML建模之数据建模(Data Model Diagram)
- 以求医为例谈搜索引擎排序算法的基础原理
- strlen sizeof详解