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

推荐订阅源

MyScale Blog
MyScale Blog
F
Fortinet All Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
D
Docker
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
V
Visual Studio Blog
Last Week in AI
Last Week in AI
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
小众软件
小众软件
L
LangChain Blog
Vercel News
Vercel News
阮一峰的网络日志
阮一峰的网络日志
IT之家
IT之家
P
Proofpoint News Feed
博客园_首页
D
DataBreaches.Net
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
C
Check Point Blog
Engineering at Meta
Engineering at Meta
Microsoft Azure Blog
Microsoft Azure 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