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

推荐订阅源

WordPress大学
WordPress大学
Microsoft Security Blog
Microsoft Security Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
V
Visual Studio Blog
宝玉的分享
宝玉的分享
IT之家
IT之家
人人都是产品经理
人人都是产品经理
T
The Blog of Author Tim Ferriss
I
InfoQ
B
Blog RSS Feed
T
Threatpost
博客园_首页
M
MIT News - Artificial intelligence
Spread Privacy
Spread Privacy
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Know Your Adversary
Know Your Adversary
U
Unit 42
Engineering at Meta
Engineering at Meta
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
Scott Helme
Scott Helme
T
Tor Project blog
有赞技术团队
有赞技术团队
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
S
Schneier on Security
Vercel News
Vercel News
博客园 - Franky
C
Cybersecurity and Infrastructure Security Agency CISA
L
LINUX DO - 热门话题
NISL@THU
NISL@THU
L
LangChain Blog
爱范儿
爱范儿
Google DeepMind News
Google DeepMind News
The GitHub Blog
The GitHub Blog
雷峰网
雷峰网
Latest news
Latest news
C
CXSECURITY Database RSS Feed - CXSecurity.com
Hugging Face - Blog
Hugging Face - Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
G
GRAHAM CLULEY
S
Security Affairs
A
About on SuperTechFans
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
大猫的无限游戏
大猫的无限游戏
W
WeLiveSecurity
Cisco Talos Blog
Cisco Talos Blog
罗磊的独立博客

博客园 - 一味

[翻译]实例:在Android调用WCF服务 基于LRU淘汰的高性能缓存 不是架构的架构之五:业务层的实现与自动代理(补充) 不是架构的架构之四:业务层的实现与自动代理 不是架构的架构之三:系统基础(2)主键选择和并发 不是架构的架构之二:系统基础(1) 不是架构的架构之一:总体思路 一道算法题 技术先行or业务先行 用了一年的键盘,记录下键盘磨损的状况 一个业务系统设计构想(一) 安装VS2008/.Net3.5/.Net3.0/.Net2.0sp1失败的解决办法 常用存储过程4(K310。3版本获取物流新单据的编码) 常用存储过程2(获取编码级次) 常用存储过程1(获取字符串中的第一个数值) SQL Server中Rollup关键字使用技巧 Math.Round函数四舍五入的问题 SQL Server进程阻塞的检查和解决办法(转自好友Blog) 学习NHibernate的感悟和疑惑
常用存储过程3(获取编码的上级编码和短编码)
一味 · 2008-04-15 · via 博客园 - 一味

获取编码的上级编码和短编码,如传入“01.01.123”,返回“01.01”和“123”
Create
 Proc GetParentNum
   
@num varchar(100),
   
@parentnum varchar(100) output,
   
@shortnum varchar(100) output
as
declare @c char(1),@i int
set @i=len(@num)
set @shortnum=''
while @i>0
begin
   
if substring(@num,@i,1)='.'
   
begin
       
set @parentnum=substring(@num,1,@i-1)
       
return
   
end
   
else
       
set @shortnum=substring(@num,@i,1)+@shortnum
   
set @i=@i-1
end

GO