Bulk Insert Task
I m using flat file connection manager my source is csv file which contains TOP 5 rows from AdventureWorks.person.contact select top 5 * from AdventureWorks.Person.Contact - my source as csv "AdditionalContactInfo"- column is XML data type in Destination. When I use Bulk Insert Task I am getting error. [Bulk Insert Task] Error: An error occurred with the following error message: "XML parsing: line 1, character 33, whitespace expected". I have tried changing code page to ANSI 1252 and SSIS datatype for AdditionalContactInfo - DT_WSTR. Nothing worked. My motive here is to learn, nothing business-logic behind this question.
October 23rd, 2010 2:27am

I have tried with SSMS BULK insert contact123 from 'C:\Documents and Settings\Administrator\Desktop\contact.csv' with ( firstrow = 2, fieldterminator= ',', rowterminator='\n' ) And receiving error Msg 9410, Level 16, State 1, Line 1 XML parsing: line 1, character 33, whitespace expected
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2010 3:49am

could you put your .csv file rows here?http://www.rad.pasfu.com
October 23rd, 2010 7:38am

Here is csv source. Thanks for your attention. please click the below link to download complete csv file. contact.csv
Free Windows Admin Tool Kit Click here and download it now
October 23rd, 2010 9:24am

could you try to add a white space at the begining of each line and try Bulk Insert again? I found this in a microsoft connect post here: https://connect.microsoft.com/SQLServer/feedback/details/406621/xml-format-file-causes-bulk-insert-of-wrong-data-into-not-null-column?wa=wsignin1.0http://www.rad.pasfu.com
October 23rd, 2010 9:50am

I added white space at beginning of the line and even replace NULL with some blank spaces. I read the connect forum and realized that "xml - bulk insert " is bug to be fixed in hotfix. Thanks Reza Raad for your quick support and help.
Free Windows Admin Tool Kit Click here and download it now
October 24th, 2010 12:56am

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

Other recent topics Other recent topics