select 中使用 case when 和 replace
来源:互联网 发布:社会经济数据库 编辑:程序博客网 时间:2024/06/05 03:16
在SELECT中,用CASE
例如:
select a.Cname as Tcomname,b.Cname as TGoodname,D.nQuanty,c.cNote, (case when c.iEvaluate='-1' then '差评' when c.iEvaluate='1' then '好评' when c.ievaluate='0' then '一般' end) as ievaluate
from Tcompany a,Tgoods b,Appraise c,orders D
where b.ID=D.nProductID and D.Id=c.order_id and a.Id=b.NsaID
and b.NsaID=@TcomIDTop
select 和 replace
select AdID,replace(replace(cast(AdClassID as varchar(50)) ,'0','头条新闻头部'),'1','头条新闻尾部') as AdClassID,Title,LinkUrl,UpdateTime from Advertisement order by AdID
- select 中使用 case when 和 replace
- select中case when的使用
- select中case-when-then用法
- HQL中使用case when
- SQL:select case when
- SQL:Select Case When
- select case when
- Oracle select case when
- SQL Server和Oracle中case when then 的用法及when like 的使用
- select语句中更改查询结果 case when
- 在查询条件中使用Case When
- sql中case when then使用实例
- 在sql语句中使用case..when
- oracle中case when的使用
- SQL中case...when使用技巧
- mysql中case when then 的使用
- oracle中case when的使用
- SQL语句中case when的使用
- html标签及其中的属性
- ubuntu学习笔记
- 广告游戏,是否为新型产物?
- 【转】linux cp 复制文件 命令
- Linux Shell 《abs_guide》 学习笔记(1)
- select 中使用 case when 和 replace
- Lynx 简明使用指南
- 如何调试命令行程序?——怎样输入命令行程序参数
- QQ2014版—2014最新版QQ官方下载
- 才弄明白Number(p,s)的意义
- 无奈,在SpagoBI结合jpalo 老出 java.lang.OutOfMemoryError: Java heap space错误
- 创建DataTable,并填充数据,模拟数据库中的表
- 韩寒经典爱情语录
- SQL Server查詢可用磁盘空间