0
我在我的表中的列,看起來像這樣:如何使用從字符串獲取值「 - 」分隔符在SQL
Row Scheme
-----------------------------
001 NULL
002 NULL
003 Scheme1-0.50-Point
003 Scheme1-0.50-Point
004 NULL
005 Scheme1-1.00-Point
006 1_N/A
的scheme
列的值concenated這樣的:
SchemeName + '-' + Points + '-' + Units
我想輸出使用T-SQL中使用-
分隔符該字符串分隔:
Row Scheme Name Point Unit
------------------------------------------------------
001 NULL NULL NULL NULL
002 NULL NULL NULL NULL
003 Scheme1-0.50-Point Scheme1 0.50 Point
003 Scheme1-0.50-Point Scheme1 0.50 Point
004 NULL NULL NULL NULL
005 Scheme1-1.00-Point Scheme1 1.00 Point
006 1_N/A NULL NULL NULL
如果可能的話,嘗試改變你的設計。 –