December 22, 2011 at 8:03 am
Hello All,
I am getting this error when I am importing data from flat file to a table.
[Flat File Source [1]] Error: Data conversion failed. The data conversion for column "LOG_TEXT" returned status value 4 and status text "Text was truncated or one or more characters had no match in the target code page.".
My data in the column log_text is text and it is like this:
Customer called in to cancel the account. I tried to offer him the special rate and informed him of all the Pros to the program. This is his last day of the grace period.
Customer cancelled within Rescission period; customer liable for energy only.
When I am previewing it I am getting the data in the field perfectly.
I dont know what the problem is.
Please assist.
Thanks
December 22, 2011 at 8:13 am
The data was truncated because it could either not fit into the destination column, or your metadata is not correct.
Check the input/output columns in the data flow, and also make sure that your destination column is large enough to handle all your possible values.
An alternative option is to ignore these truncation errors, but that will only result in data inconsistencies.
December 22, 2011 at 8:28 am
I have selected ignore failure for truncation and ran the package. But the data is getting truncated. How to solve this error. In my dest table for this column I have given nvarchar(max). So the length is maximum. Still where do I need to give the length for this column?
Thanks
December 22, 2011 at 8:33 am
srik.kotte (12/22/2011)
I have selected ignore failure for truncation and ran the package. But the data is getting truncated. How to solve this error. In my dest table for this column I have given nvarchar(max). So the length is maximum. Still where do I need to give the length for this column?Thanks
As suggested above, you should not ignore these truncation errors...otherwise the data will just be truncated in your destination column as you have found.
Your problem is probably with your metadata (as I have also mentioned above). Check the input/output columns in your source and destination in the data flow. You will find that you may have to manually adjust the length.
December 22, 2011 at 12:07 pm
Still where do I need to give the length for this column?
Go to advanced in your flat file connection manager and make sure the column is DT_NText because that is what will map to Nvarchar(max) in SQL Server.
Kind regards,
Gift Peddie
December 22, 2011 at 2:14 pm
Yup I got it. Thanks a lot for your time.
December 22, 2011 at 2:33 pm
srik.kotte (12/22/2011)
Yup I got it. Thanks a lot for your time.
I am glad I could help and happy holidays.
Kind regards,
Gift Peddie
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply