sql server - Bulk insert not processing void files -


i trying load data using bulk insert in sql server using -

bulk insert customere  'f:\\tempp\\invoice_1500645000008_24072017_1127.csv' (formatfile = 'f:\\tempp\\invoice.fmt') 

but in file have header (means 0 record) throwing below given error : msg 4832, level 16, state 1, line 86 bulk load: unexpected end of file encountered in data file. msg 7399, level 16, state 1, line 86 ole db provider "bulk" linked server "(null)" reported error. provider did not give information error. msg 7330, level 16, state 2, line 86 cannot fetch row ole db provider "bulk" linked server "(null)".

whenever loading data loading...

can process 0 record file without error.??

thanks

you put bulk insert in try..catch have run dynamic query otherwise try..catch not going catch error. gives option log information empty file well.

begin try  declare @cmd varchar(1000)  set @cmd = 'bulk insert customere ''f:\tempp\invoice_1500645000008_24072017_1127.csv'' (formatfile = ''f:\tempp\invoice.fmt'')  execute (@cmd) end try  begin catch end catch 

Comments

Popular posts from this blog

html - How to custom Bootstrap grid height? -

javascript - pass values from mssql to views in node -

python - Getting 405 error while trying to download nltk data -