Reputation: 15787
I have created an SQL OLEDB data source (SQL Server) and I have the following Command Text:
select replace(convert(varchar(10), dob, 111), '/', '-') As DOB FROM Person
I get a warning on executing that says: [OLE DB Source [1]] Warning: Truncation may occur due to retrieving data from database column "DOB" with a length of 8000 to data flow column "DOB" with a length of 10.
When I try to change the external column from 8000 to 10 (as stated in the query), the designer automatically changes it back. I thought that external columns represented meta data in the data source. The dob in the data source (see query above) is a varchar(10). Why does it have to have a length of 8000? I don't have a lot of experience with SSIS.
Upvotes: 1
Views: 1830
Reputation: 1015
There is another workaround to overcome this as: you can ignore the errors and execute the package from 'Truncation' erros by setting the appropriate property in 'Source' block's 'Error output' tab..
Upvotes: 2
Reputation: 15787
I have found the solution. I had to do this:
select cast(replace(convert(varchar(10), dob, 111), '/', '-') As varchar(10)) As DOB from Person
Upvotes: 4