如何使用T-SQL从字符串中获取数字部分? [英] How to get the numeric part from a string using T-SQL?
本文介绍了如何使用T-SQL从字符串中获取数字部分?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在sql表中有包含字符串的列,如下所示:
我从第231号台号获得项目编号2015
项目编号2015更新等级
i必须从字符串中提取数字
提前致谢
解决方案
我认为没有现成的解决方案。可能需要编写一个函数。找到一个这里
< blockquote> 用户-defined-function-to-extract-only-numbers-from-string [ ^ ]
I have column containing string in sql table like this:
"I have item number 2015 from desk number 231"
"The item number 2015 is update in rank"
i have to extract numbers from string
Thanks in advance
解决方案
I dont think there is an off the shelf solution. Probably need to write a function. Found one here
user-defined-function-to-extract-only-numbers-from-string[^]
这篇关于如何使用T-SQL从字符串中获取数字部分?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文