Import Package Error - Cannot Convert between Unicode and Non Unicode String Data Type

前端 未结 16 656
小蘑菇
小蘑菇 2021-01-31 13:29

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.

16条回答
  •  情话喂你
    2021-01-31 14:18

    Not sure if this is a best practice with SSIS but sometimes I find their tools are a bit clunky when you want to do this type of activity.

    Instead of using their components you can convert the data within your query

    Instead of doing

    SELECT myField = myNvarchar20Field
    FROM myTable
    

    You could do

    SELECT myField = CONVERT(VARCHAR(20),myNvarchar20Field)
    FROM myTable
    

提交回复
热议问题