我创建了一个 SSIS 包,它从我们的数据库执行内联 SQL 查询,并且应该将内容输出到文本文件。我最初将文本文件用逗号分隔,但在进一步研究错误后改为管道分隔。我还做了一个 FirstName 字段的子字符串,并确保 SSIS 占位符字段的长度匹配。错误信息如下:
[Customers Flat File [196]] Error: Data conversion failed. The data conversion for
column "FirstName" returned status value 4 and status text "Text was truncated or one or more
characters had no match in the target code page.".
我在 OLE DB 源中使用的 SQL 语句如下:
SELECT
dbo.Customer.Email, SUBSTRING(dbo.Customer.FirstName, 1, 100) AS FirstName,
dbo.Customer.LastName, dbo.Customer.Gender,
dbo.Customer.DateOfBirth, dbo.Address.Zip, dbo.Customer.CustomerID, dbo.Customer.IsRegistered
FROM
dbo.Customer INNER JOIN
dbo.Address ON dbo.Customer.CustomerID = dbo.Address.CustomerID
我应该进行哪些其他修复以确保程序包正常运行?