Bulk Insert Fixed Length Text File
I have a huge fixed length flat file with no column delimiters, I am trying to port this data into a table using BCP utility. Below is my sample format I created with BCP: My table design: BACD nchar(1), SSN nchar(9), Lastname nchar(20), suffix nchar(4), firstname nchar(15), middlename nchar(15), code nchar(1), dod nchar(8), dob nchar(8), blank nchar(19) Sample data: 005070002Foobar FOOOO 671903 SQL query: BULK INSERT sample.dbo.DD FROM 'C: sample-for-test.txt' WITH (FORMATFILE = 'C: format-n.xml', ROWTERMINATOR=' r n'); SELECT * FROM sample.dbo.DD; Error I am getting is: Msg 4863, Level 16, State 1, Line 1 Bulk load data conversion error (truncation) for row 1, column 1 (BACD). Msg 7399, Level 16, State 1, Line 1 The OLE DB provider 'BULK' for linked server '(null)' reported an error. The provider did not give any information about the error. Msg 7330, Level 16, State 2, Line 1 Cannot fetch a row from OLE DB provider 'BULK' for linked server '(null)'. I checked the BACD column, the length is 1 character and the value in this case a space. All the columns allow nulls. Sound Packs Torrent.
I am trying to use bulk insert to import a fixed length file. I can find instructions on how to do this for a comma delimited file. Text this----.
Can anyone let me know what I am doing wrong? And why am i getting this error? Ministry Of Sound The Annual 2004 Youtube.