(1)原数据
select * from SuZhou_Container_info()
(2)想得到的数据
(3)SuZhou_Container_info() =表
Select B.OrderID,
CONVERT(VARCHAR(1000),Left(TempInfo,LEN(TempInfo) - 1),120)AS CONTAINER_INFO
From
(
Select OrderID,
(
Select CONTAINER_INFO + ' '
From SuZhou_Container_info()
Where OrderID = A.OrderID
AND CONTAINER_INFO IS NOT NULL
For XML Path('')
) AS TempInfo
From SuZhou_Container_info() A
Group By OrderID
) B