I have made a dtsx package on my computer using SQL Server 2008. It imports data from a semicolon delimited csv file into a table where all of the field types are NVARCHAR MAX.
It works on my computer, but it needs to run on the clients server. Whenever they create the same package with the same csv file and destination table, they receive the error above.
We have gone through the creation of the package step by step, and everything seems OK. The mappings are all correct, but when they run the package in the last step, they receive this error. They are using SQL Server 2005.
Can anyone advise where to begin looking for this problem?
Sometime we get this error when we select static character as a field in source query/view/procedure and the destination field data type in Unicode.
Below is the issue i faced: I used the script below at source
and got the error message
Column "CATEGORY" cannot convert between Unicode and non-Unicode string data types.
as below: error messageResolution: I tried multiple options but none worked for me. Then I prefixed the static value with N to make in Unicode as below:
The dts data Conversion task is time taking if there are 50 plus columns!Found a fix for this at the below link
However, it does not seem to work for versions above 2008. So this is how i had to work around the problem
Non-Unicode string data types:
Use STR for text file and VARCHAR for SQL Server columns.
Unicode string data types:
Use W_STR for text file and NVARCHAR for SQL Server columns.
The problem is that your data types do not match, so there could be a loss of data during the conversion.