sql - Bulk insert with Blank values -
i have 1 table 48 columns in want import data csv file. csv file consist of blank values.
whenever uses bulk insert getting error:
1) bulk load data conversion error (type mismatch or invalid character specified codepage) row 1, column 1 (column name)
2)the ole db provider "bulk" linked server "(null)" reported error. provider did not give information error.
3)cannot fetch row ole db provider "bulk" linked server "(null)".
i using sql server 2008
below bulk insert command using:- **
bulk insert databasename.dbo.tablename 'c:\foldername\filename.csv' ( firstrow = 1, fieldterminator =',', rowterminator ='\n', keepnulls )**
please suggest how handle it..?
for type of errors make sure below things:
1.the datalength should matched according .csv file(use trial , error method , reach lengths).
the number of columns should matched(need check manually).
the datatype conversions should done implicitly(better use nvarchar datatype in order avoid errors).
Comments
Post a Comment