Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 15264

Bulk Insert format file

$
0
0

Hi,

I am trying to insert a sectional CSV file into database using a format file. my CSV file looks like:

Section::Test
Column1,Column2
1,2

Section::Test2
Sec2Col1,Sec2Col2,sec3col3,sec4col4,sec5col5
1,2,3,4,2
2,3,4,5,3
4,5,6,5,6

Section::Test3
newCol1,newCol2,newcol3,newcol4
2,3,4,2
3,4,5,3

Section::Test4
Col1,col2,col3
2,2,2
3,4,5
5,4,6

but it is throwing an error while inserting the 2nd,3rd and 4th sections into their respective tables.

Msg 4832, Level 16, State 1, Line 2
Bulk load: An unexpected end of file was encountered in the data file.
Msg 7301, Level 16, State 2, Line 2
Cannot obtain the required interface ("IID_IColumnsInfo") from OLE DB provider "BULK" for linked server "(null)".

Thank you


Viewing all articles
Browse latest Browse all 15264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>