这适用于您的样本,但您必须根据真实数据对其进行测试才能确定。
WITH CTE_StringSplit AS
(
SELECT CAST(NULL AS NVARCHAR(MAX)) AS [Text], CAST(NULL AS NVARCHAR(MAX)) AS [Value] , CAST([Text] AS NVARCHAR(MAX)) AS RemainingText
FROM Info
UNION ALL
SELECT
SUBSTRING(RemainingText,0,CHARINDEX(' ',RemainingText))
,LTRIM(SUBSTRING(RemainingText,CHARINDEX(' ',RemainingText),CASE WHEN CHARINDEX(' ',LTRIM(SUBSTRING(RemainingText,CHARINDEX(' ',RemainingText),DATALENGTH(RemainingText)))) > 0 THEN CHARINDEX(' ',LTRIM(SUBSTRING(RemainingText,CHARINDEX(' ',RemainingText),DATALENGTH(RemainingText)))) ELSE DATALENGTH(RemainingText) END + 11))
,LTRIM(SUBSTRING(RemainingText,11 + CHARINDEX(' ',RemainingText) + CASE WHEN CHARINDEX(' ',LTRIM(SUBSTRING(RemainingText,CHARINDEX(' ',RemainingText),DATALENGTH(RemainingText)))) > 0 THEN CHARINDEX(' ',LTRIM(SUBSTRING(RemainingText,CHARINDEX(' ',RemainingText),DATALENGTH(RemainingText)))) ELSE DATALENGTH(RemainingText) END,DATALENGTH(RemainingText)))
FROM CTE_StringSplit
WHERE LEN(RemainingText)>0
)
SELECT [Text],[Value]
FROM CTE_StringSplit
WHERE [Text] IS NOT NULL
如果需要更正,请使用其他示例更新问题。