Importing XML File and Truncation Error with nvarchar(4000)
I am using SQL 2008 and trying to import and XML file into my database using SSIS. Recently, during my import I get a truncation error which occurs on a product_description field in the XML file. The problem is the data in this field exceeds the maximum length allowed. During the creation of the XML data flow, all string data type are set to Unicode String (nvarchar). As a result, the max length is 4000. I set this max length In the Input and Output Properties of the Advanced Editor. The truncation error occurs when SSIS tries to import data with more than 4000 characters. 1. Is it true that when it comes to importing data from an XML file that fields with string type always defaults to nvarchar during the creation of XML source? Can I control whether to use nvarchar or varchar ? 2. How can I increase the 4000 character length to a higher number, or to nvarchar(max). When I try to change it in the OutPut columns of the Input And Output Properties under the Advanced Editor, I get an error still. Any help appreciated Westside2008
July 2nd, 2011 1:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics