如何拆分SQL Server 2008中的子字符串 [英] how to split the substring in SQL server 2008

查看:92
本文介绍了如何拆分SQL Server 2008中的子字符串的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将参数传递给存储过程作为字符串RET:WHO:IMP:XMP

现在我将此字符串拆分为不同的字符串RET WHO IMP XMP。我该怎么办?

i pass the parameter to stored procedure as string "RET:WHO:IMP:XMP"
now i wane to split this string as different string RET WHO IMP XMP. how can I?

推荐答案

看看这个有用的函数实现 - http://www.logiclabz.com/sql-server/split-function-in-sql-server- to-break-comma-separated-strings-into-table.aspx [ ^ ]。
Have a look at this useful function implementation - http://www.logiclabz.com/sql-server/split-function-in-sql-server-to-break-comma-separated-strings-into-table.aspx[^].


这里有几个方式



SQL中的拆分字符串 [ ^ ]
Here more than couple of ways

Split String in SQL[^]


link-SQL Server拆分功能 [ ^ ]可能对您有所帮助。
This link-SQL Server Split Function[^] might help you.


这篇关于如何拆分SQL Server 2008中的子字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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