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

推荐订阅源

P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Apple Machine Learning Research
Apple Machine Learning Research
Hugging Face - Blog
Hugging Face - Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
B
Blog
月光博客
月光博客
博客园 - 【当耐特】
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
I
InfoQ
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
Jina AI
Jina AI
博客园 - Franky
MyScale Blog
MyScale Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Last Week in AI
Last Week in AI
B
Blog RSS Feed
H
Help Net Security

博客园 - 深圳杰瑞

Visual Studio 2010到底怎么样? 书评:我看《软件开发沉思录ThoughtWorks文集》 准备开始研究WF和WCF 2008第一帖:WSDL Binding风格 一个样式很特殊的网页 今天居然中了MSN病毒。 用Sandcastle生成CHM1.x中文文档(续) 理解SOAP的好文章 分布式计算技术 Powerdesigner 扩展模型的机制分析 脚本语言和动态语言的讨论。 如何嵌入Live Messenger? 让IE中的IFrame透明 截获SQL Server客户端登录SQL Server服务器的密码 网站CSS设计站点链接 用Sandcastle生成CHM1.x中文文档 今天看到的几本好书 客户端脚本刷新UpdatePanel的链接 设计文章链接
自己编写一个SQL Server中用的lastindexof函数
深圳杰瑞 · 2007-12-27 · via 博客园 - 深圳杰瑞

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