ORACLE中的DECODE函数
今天遇到一个问题,数据库中需要排序的字段是中文,但是有不能按照中文拼音来排序,在网上查到一些资料,完美的解决了问题。
DECODE(DS.RANGE_NAME,'高',3,'中',2,'低',1,'潜在',0) AS RANGE_NAME。
decode的详细用法,可以参考一下内容:http://www.cnblogs.com/freespider/archive/2010/08/09/1795977.html
ORACLE中的DECODE函数的更多相关文章
- oracle 中的decode函数
decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值) 该函数的含义如下:IF 条件=值1 THEN RETURN(翻译值1)ELSIF 条件=值2 THEN RETURN ...
- Oracle中的decode()函数
一.decode()函数 1.语法 DECODE(control_value,value1,result1[,value2,result2-][,default_result]); control _ ...
- oracle中的decode函数的使用
含义解释:decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值) 该函数的含义如下:IF 条件=值1 THEN RETURN(翻译值1)ELSIF 条件=值2 THEN R ...
- Oracle中的单行函数
Oracle中的单行函数 1 字符函数 UPPER()--将字符串转换为大写 SELECT UPPER('abc') FROM dual; LOWER()-将字符串转换为小写 SELECT LOWER ...
- oracle中的DECODE
原文:oracle中的DECODE DECODE函数相当于一条件语句(IF).它将输入数值与函数中的参数列表相比较,根据输入值返回一个对应值.函数的参数列表是由若干数值及其对应结果值组成的若干序偶 ...
- 问题:oracle decode;结果:oracle中的decode的使用
oracle中的decode的使用 Oracle 中 decode 函数用法 含义解释:decode(条件,值1,返回值1,值2,返回值2,...值n,返回值n,缺省值) 该函数的含义如下:IF 条件 ...
- Oracle中 Instr 这个函数
http://www.jb51.net/article/42369.htm sql :charindex('字符串',字段)>0 charindex('administrator',MUserI ...
- Oracle中的substr()函数 详解及应用
注:本文来源于<Oracle中的substr()函数 详解及应用> 1)substr函数格式 (俗称:字符截取函数) 格式1: substr(string string, int a, ...
- MySQL之实现Oracle中的rank()函数的功能
假设表格为student, 数据如下: 我们要在MySQL中实现Oracle中的rank()函数功能,即组内排序,具体来说: 就是对student表中按照课程(course)对学生(name) ...
随机推荐
- VLC嵌入网页,终于要成功了!
<OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" width="640" heig ...
- CentOS 6 安装 MySQL-python
yum install -y mysql-devel python-devel python-setuptools pip install MySQL-python
- The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name
可以强迫部署EntityFramework.SqlServer.dll这个文件到输出目录 找到1个老外的帖子,戳这里(本人测试无效,大家有可能试一下..) 解决方案以下: 在EF的上下文代码CS文件( ...
- 特征提取k_word
1) 若直接以20种氨基酸统计k_word: (以ZD98数据集为例) k Dimension 2 400 3 6490 4 22265 维数太大不适用构造特征向量 考虑氨基酸约化后特征提取 约化方案 ...
- iOS.Performance-trick-presentViewController-is-so-slow-in-didSelectRowAtIndexPath
presentViewController is so slow in "tableView:didSelectRowAtIndexPath:" Use Case: 在UITabl ...
- JAVA可移植性广泛应用
一.JAVA作为一种编程语言:源代码可移植性 作为一种编程语言,JAVA提供了一种最简单同时也是人们最熟悉的可移植性–源代码移植.这意味着任意一个JAVA程序,不论它运行在何种CPU.操作系统或JAV ...
- VBA常用函数
字符串相关: ①截取字符串: 从字符串左侧开始:Left(string,length) 从字符串右侧开始:Right(string,length) 从字符串中间开始:mid(string,start, ...
- amr转MP3
using System; using System.Threading; using System.IO; using System.Diagnostics; using System.Securi ...
- 关于SharePoint 2010中不能使用AjaxControlToolkit的解决办法
因为项目中有一个需求需要使用calendar控件,而且样式要和Reporting Service中的尽量一致,搜索了很久发现还是微软的AjaxControlToolkit提供的CalendarExte ...
- which type of VS files should be committed into a version control system
which type of VS files should be committed into a version control system? aps, no: last resource edi ...