需要帮助的家伙。我正在尝试使用以下查询来获取表中的数据。它适用于 SSMS ,但在 SSIS 中会引发错误。
SELECT CONVERT(VARCHAR(10), GETDATE(), 120) AS col1
UNION ALL
SELECT CAST (CustomerID AS VARCHAR)
FROM tCustomer
UNION ALL
SELECT CAST(COUNT(*) AS VARCHAR) AS col1
FROM tCustomer
抛出错误
[OLE DB Source [1]] Error: There was an error with output column "col1" (35) on output "OLE DB Source Output" (11). The column status returned was: "The value could not be converted because of a potential loss of data.".
我想要实现的是
Header line yyyy-mm-dd
--e.g. 2013-07-01
Data records
Trailer record
---e.g. 13480
我哪里错了?