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

推荐订阅源

爱范儿
爱范儿
Forbes - Security
Forbes - Security
Help Net Security
Help Net Security
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News: Ask HN
Hacker News: Ask HN
TaoSecurity Blog
TaoSecurity Blog
IT之家
IT之家
Microsoft Azure Blog
Microsoft Azure Blog
云风的 BLOG
云风的 BLOG
博客园 - 司徒正美
B
Blog
阮一峰的网络日志
阮一峰的网络日志
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
The Register - Security
The Register - Security
美团技术团队
C
CERT Recently Published Vulnerability Notes
I
Intezer
C
Cybersecurity and Infrastructure Security Agency CISA
Google Online Security Blog
Google Online Security Blog
B
Blog RSS Feed
PCI Perspectives
PCI Perspectives
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MyScale Blog
MyScale Blog
S
Securelist
Recorded Future
Recorded Future
Know Your Adversary
Know Your Adversary
Security Archives - TechRepublic
Security Archives - TechRepublic
M
MIT News - Artificial intelligence
C
Check Point Blog
T
Threat Research - Cisco Blogs
博客园 - Franky
P
Proofpoint News Feed
人人都是产品经理
人人都是产品经理
U
Unit 42
F
Fortinet All Blogs
S
Security @ Cisco Blogs
The GitHub Blog
The GitHub Blog
Apple Machine Learning Research
Apple Machine Learning Research
MongoDB | Blog
MongoDB | Blog
The Hacker News
The Hacker News
酷 壳 – CoolShell
酷 壳 – CoolShell
F
Full Disclosure
aimingoo的专栏
aimingoo的专栏
大猫的无限游戏
大猫的无限游戏
D
Docker
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LINUX DO - 热门话题

博客园 - 心愿

IIS上启用Gzip对网页进行压缩(图文) 健康养生:掌握规律,合理睡眠 SQL Server 数据库出现 置疑的处理方法 . Windows补丁:安装程序不能验证Update.inf文件的完整性,请确定加密服务正在此计算机上运行 使用URLRewriter重写后,相同后缀后的真实静态文件无法访问的解决办法 Sql server WaitType 日志 【转载】办公室禁止QQ登录的用法 [转]SQL Server 2005新特性 [转]艾瑞咨询:网络招聘的顺势突围之道 [收藏]sql查询性能调试,用SET STATISTICS IO和SET STATISTICS TIME 关于未能创建 Mutex 问题的解决 二级域名共享Cookie时碰到的问题:Padding is invalid and cannot be removed [摘录]Windows Server十大隐患服务 [收集|整理]优化SQL Server数据库相关注意事项 [收集]精典诗词改篇:沁园春 车票 [转]NUnit2.0详细使用方法 [转]利用UrlRewriter 实现二级域名 熬夜——健康的天敌 Asp.net中基于Forms验证的角色验证授权
[收集]自己编写一个SQL Server中用的lastindexof函数
心愿 · 2008-03-20 · via 博客园 - 心愿

2008-03-20 12:06  心愿  阅读(284)  评论(0)    收藏  举报

CREATE FUNCTION dbo.lastindexof (@stringValue as nvarchar(1000), @stringSearch as nvarchar(1000), @startPosition as int = 0)
returns int
AS
BEGIN
DECLARE @lastindex int
SET @lastindex= @startPosition
DECLARE @tempindex int
while (1=1)
begin
SET @tempindex = charindex(@stringSearch, @stringValue, @lastindex + 1)
if (@tempindex = 0)
break
SET @lastindex = @tempindex
end
RETURN(@lastindex)
END