0
可能重複:
SQL 2005 Split Comma Separated Column on Delimiter如何打破逗號分隔值插入列
Specialist JID
--------------- -------------------
ANA 1 ,5 ,9 ,7 ,6
GEN 2 ,3 ,11 ,13 ,45 ,23 ,28 ,41 ,49 ,52
robin 12 ,15 ,17
想我的查詢返回上面的輸出。我怎樣才能分隔逗號分隔的數據到分隔列。是否有可能......請指導。謝謝
什麼版本的SQL服務器? – JohnFx 2011-06-03 13:27:26
這可以幫助http://stackoverflow.com/questions/2647/split-string-in-sql – Algorithmist 2011-06-03 13:32:24
http://www.codeproject.com/KB/database/SQL_UDF_to_Parse_a_String.aspx – Algorithmist 2011-06-03 13:32:52