[英]Converting Nvarchar(max) source data to varchar(max) destination in SSIS
I am trying to move the data from nvarchar(max) column in sql table to varchar(max) column of another sql table in SSIS package. 我试图将数据从sql表中的nvarchar(max)列移动到SSIS包中另一个sql表的varchar(max)列。 It keeps giving me error at data conversion transformation of truncation. 它在截断的数据转换转换时一直给我错误。
I have two data conversion transformation: 我有两个数据转换转换:
In the OLEDB Source use an SQL command as access mode an cast column within the query: 在OLEDB源中,使用SQL命令作为访问模式,在查询中使用转换列:
Select CAST([column] as varchar(max)) FROM Table
When casting within SQL command there is no need to use Data Conversion Transformation in the Data Flow Task 在SQL命令中进行转换时,无需在数据流任务中使用数据转换转换
If CAST() didn't works it means that the column contains some unicode characters which cannot be converted to a non unicode string, you can handle these values via the Error Output
if you are using a Data Conversion Transformation or you can refer to one of the following links: 如果CAST()不起作用,则表示该列包含一些无法转换为非unicode字符串的unicode字符,如果使用数据转换转换,则可以通过Error Output
处理这些值,或者可以参考一个以下链接:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.