我想知道是否有人可以帮助我。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