我已经搜索了一段时间,以找到解决方案以实现对sis的sql服务器查询
SELECT
Sales_Order_Number,company_code,isnull(
(
SELECT
distinct Description + ';' AS 'text()'
FROM
dbo.l_Fact_Orders as xml
INNER JOIN dbo.Tbl_Dim_ItemSOA items ON items.Item_SOA_ID=xml.Item_SOA_ID
WHERE
xml.Sales_Order_Number = myTable.Sales_Order_Number
and xml.company_code = myTable.company_code
FOR
XML PATH('')
)
,'') as Description
FROM
dbo.l_Fact_Orders myTable
GROUP BY
Sales_Order_Number,company_code
我正在寻找想法。