我想知道是否有人可以幫助我。tsql函數拆分字符串
我需要一個TSQL函數在給定值分割,如:
1) 00 Not specified
3) 01-05 Global WM&BB | Operations
2) 02-05-01 Global WM&BB | Operations | Operations n/a
我需要得到這樣的結果:
cat1 cat1descr cat2 cat2descr cat3 cat3descr
----------------------------------------------------------------
00 Not especified null null null null
01 Global WM&BB 05 Operations null null
01 Global WM&BB 05 Operations 01 Operations n/a
結果都將永遠6列
選擇funcX('00未指定');
cat1 cat1descr cat2 cat2descr cat3 cat3descr
----------------------------------------------------------------
00 Not especified null null null null
哪個版本的SQL Server? – MartW 2009-10-20 14:11:09
http://stackoverflow.com/questions/2647/split-string-in-sql – tster 2009-10-20 13:44:46