我正在开发一个SSIS包来执行从SQL Server 2008到Excel文件的提取。
"提取概念"是一个OLE DB源。它执行此SQL语句:
SELECT
Id,
Name,
Surname,
(
SELECT
CI.Interest + '; '
FROM
CustomerInterests CI
WHERE
CI.CustomerId = C.ID
FOR XML PATH ('')
) AS Interest
FROM
Customer C
WHERE Id = ?
如果我修改我的SQL语句如下,则不会出现错误:
SELECT
Id,
Name,
Surname,
NULL AS Interest
FROM
Customer C
WHERE Id = ?
你能帮帮我吗?
感谢