Bulk Import of CSV into SQL Server -
i having .csv file contain more 1,00,000 rows.
i have tried following method import csv table "root"
bulk insert [dbo].[root] 'c:\original.csv' ( fieldterminator = ',', rowterminator = '\n' ) but there many errors check terminators.
i opened csv notepad.
there no terminator , or \n. find @ end of row square box there.
please me import csv table.
http://msdn.microsoft.com/en-us/library/ms188609.aspx
comma-separated value (csv) files not supported sql server bulk-import operations. however, in cases, csv file can used data file bulk import of data sql server. note field terminator of csv file not have comma. usable data file bulk import, csv file must comply following restrictions:
- data fields never contain field terminator.
- either none or of values in data field enclosed in quotation marks ("").
note: there may other unseen characters need stripped source file. vim (command ":set list") or notepad++(view > show symbol > show characters) 2 methods check.
Comments
Post a Comment