如何在sql server中的字符串中找到第n个字符? [英] how to find nth occurrence of character in a string in sql server?

查看:502
本文介绍了如何在sql server中的字符串中找到第n个字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在sql server中的字符串中找到第n个字符?



这里我有一个字符串,我想找出第n个字符那个字符串。



例如:字符串是'Hemanth'



如果我想找出来第5个字符我必须得到'n'7'字符我必须得到'h'这样的。怎么做?有人帮我吗?

how to find nth occurrence of character in a string in sql server?

Here i have a string and i would like to find out the n'th character of that string.

for example: string is 'Hemanth'

if i want to find out 5'th character i must get 'n' 7'th character i must get 'h' like this. how to do it? some one help me?

推荐答案

试试 SUBSTRING [ ^ ]


这篇关于如何在sql server中的字符串中找到第n个字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆