DBS-Function:f_GetPy
ylbtech-SQL Server-Function:f_GetPy |
A, 返回顶部 |
Create function [dbo].[f_GetPy](@str nvarchar(4000))
returns nvarchar(4000)
as
begin
declare @strlen int,@re nvarchar(4000)
declare @t table(chr nchar(1) collate Chinese_PRC_CI_AS,letter nchar(1))
insert into @t(chr,letter)
select '吖 ', 'A ' union all select '八 ', 'B ' union all
select '嚓 ', 'C ' union all select '咑 ', 'D ' union all
select '妸 ', 'E ' union all select '发 ', 'F ' union all
select '旮 ', 'G ' union all select '铪 ', 'H ' union all
select '丌 ', 'J ' union all select '咔 ', 'K ' union all
select '垃 ', 'L ' union all select '嘸 ', 'M ' union all
select '拏 ', 'N ' union all select '噢 ', 'O ' union all
select '妑 ', 'P ' union all select '七 ', 'Q ' union all
select '呥 ', 'R ' union all select '仨 ', 'S ' union all
select '他 ', 'T ' union all select '屲 ', 'W ' union all
select '夕 ', 'X ' union all select '丫 ', 'Y ' union all
select '帀 ', 'Z '
select @strlen=len(@str),@re= ' '
while @strlen> 0
begin
select top 1 @re=letter+@re,@strlen=@strlen-1
from @t a where chr <=substring(@str,@strlen,1)
order by chr desc
if @@rowcount=0
select @re=substring(@str,@strlen,1)+@re,@strlen=@strlen-1
end
return(@re)
end
B,返回顶部 |
C,返回顶部 |
D,返回顶部 |
![]() |
作者:ylbtech 出处:http://storebook.cnblogs.com/ 本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 |
DBS-Function:f_GetPy的更多相关文章
- Function:光标位置插入文本并且光标移动到最后
//光标位置插入文本 function insertText(obj, str) { if(document.selection) { var sel = document.selection.cre ...
- Oracle Function:TO_CHAR
Description The Oracle/PLSQL TO_CHAR function converts a number or date to a string.将数字转换为日期或字符串 Syn ...
- Oracle Function:COUNT
Description The Oracle/PLSQL COUNT function returns the count of an expression. The COUNT(*) functio ...
- Oracle Function: NVL
Description The Oracle/PLSQL NVL function lets you substitute a value when a null value is encounter ...
- [ES6系列-02]Arrow Function:Whats this?(箭头函数及它的this及其它)
[原创] 码路工人 大家好,这里是码路工人有力量,我是码路工人,你们是力量. 如果没用过CSharp的lambda 表达式,也没有了解过ES6,那第一眼看到这样代码什么感觉? /* eg.0 * fu ...
- Function:html结构转字符串形式显示
//Html结构转字符串形式显示 支持<br>换行 function ToHtmlString(htmlStr) { return toTXT(htmlStr).replace(/\&am ...
- Oracle之:Function :strFormatDate()
create or replace function strFormatDate(i_datestr in varchar2) return date is begin if i_datestr is ...
- Oracle之:Function :func_float()
create or replace function func_float(i_value float) return number is v_index number := 0; v_str var ...
- Oracle之:Function :numberToDate()
create or replace function numberToDate(i_date in number) return date is v_date number; result date ...
随机推荐
- vue中使用axios最详细教程
前提条件:vue-cli 项目 安装: npm npm 在main.js导入: // 引入axios,并加到原型链中 import axios from 'axios'; Vue.prototype. ...
- excel表格导入数据库数据存在则更新不存在添加
public void excelToDB() throws ParseException { String datapath = this.getParameter("datapath&q ...
- URAL 1099 Work Scheduling (一般图最大匹配) 模板题【带花树】
<题目链接> <转载于 >>> > 题目大意: 给出n个士兵,再给出多组士兵之间两两可以匹配的关系.已知某个士兵最多只能与一个士兵匹配.求最多能够有多少对匹 ...
- [ 严重 ] my网SQL注入
RANK 80 金币 100 数据包 POST maoyan.com/sendapp HTTP/1.1Host: xxx.maoyan.comUser-Agent: Mozilla/5.0 ( ...
- 解决和排查 "必须使用适当的属性和方法修改 User-Agent" 错误时遇到的一些坑
解决 必须使用适当的属性和方法修改 User-Agent 错误 问题描述:近在项目中有一个需求为需要在 Http 的Header里面添加一个User-Agent参数,当请求时.项目本身的目标框架是 . ...
- Linux学习笔记 1 环境变量 2 vi命令
1 环境变量篇 1.1 修改 查看 生效 系统环境变量 1 涉及系统环境变量的文件 --> .bash_profile --> /etc/profile 2 该文件位置 /root ...
- python 多线程和多进程
多线程与多进程 知识预览 一 进程与线程的概念 二 threading模块 三 multiprocessing模块 四 协程 五 IO模型 回到顶部 一 进程与线程的概念 1.1 进程 考虑一个场景: ...
- DataGrid绑定DataTable出错
直接用DataGrid.ItemSource = DataTable.DefaultView时会出现以下错误: target element is 'TextBlock' (Name=''); tar ...
- GBT 33200-2016 社会治安综合治理 综治中心建设与管理规范 GBT 31000-2015 社会治安综合治理基础数据规范
阚总发的两个国标的标准文件, 看看里面对于数据和问题的分类等. 我们出统计分析,可以按照标准出各个大类小类的各种指标数据. 结合这几天给潍坊弄的12345的报告, 整理出一个可以结合吴中现有平台数据, ...
- BZOJ.1109.[POI2007]堆积木Klo(DP LIS)
BZOJ 二维\(DP\)显然.尝试换成一维,令\(f[i]\)表示,强制把\(i\)放到\(a_i\)位置去,现在能匹配的最多数目. 那么\(f[i]=\max\{f[j]\}+1\),其中\(j& ...