2012-08-02 59 views
0

可能重复:
Split Function equivalent in tsql?SQL Server解析函数?

我有一个包含表单数据的列:

CustomerZip::12345||AccountId::1111111||s_Is_Advertiser::True||ManagedBy::3000||CustomerID::5555555|| 

确实SQL有任何形式的内置功能,轻松地分析取出这些数据,还是必须构建自己的patindex/substring函数,以将每个值拉入其自己的字段?

+0

请参阅http://stackoverflow.com/questions/5722700/how-do-i-split-a-delimited-string-in-sql-server-without-creating-a-function – 2012-08-02 13:58:07

+0

此博客文章可能也有帮助:http://www.sqlperformance.com/2012/07/t-sql-queries/split-strings – 2012-08-02 14:11:20

回答

0

我不相信有什么内置的东西。看看你的原始问题张贴的评论。

如果这是您经常需要的东西,请考虑编写一个视图。