2012-08-02 51 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

我不相信有什麼內置的東西。看看你的原始問題張貼的評論。

如果這是您經常需要的東西,請考慮編寫一個視圖。