惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
J
Java Code Geeks
小众软件
小众软件
D
Docker
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
V
V2EX
博客园 - 叶小钗
GbyAI
GbyAI
Microsoft Azure Blog
Microsoft Azure Blog
Stack Overflow Blog
Stack Overflow Blog
B
Blog RSS Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 【当耐特】
IT之家
IT之家
博客园 - 司徒正美
M
MIT News - Artificial intelligence
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
罗磊的独立博客
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
C
Check Point Blog

博客园 - allonkwok

http header as3 打开窗口类 Tomcat Server 原理 SVN 安装配置快速入门 JS中常用的xpath特性 天极网软件频道的用JS实现的图片切换特效 div动态展开和关闭 DOM属性速查 div+css兼容性问题 asp常用函数 Flash使用正则进行注册验证 javascript 获取URL参数 仿163弹出层 GridView 介绍 转:GridView 72般绝技 [作者:清清月儿] Javascript Unicode 编码和反编码函数 提取文章内容的纯文本,并截取一定的字数 javascrip动态时钟 手机号码验证的JS代码(包含153、159)
select 中使用 case when 和 replace
allonkwok · 2016-06-03 · via 博客园 - allonkwok

在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