sql server - MS SQL Bulk Insert -
i have requirement insert large 2 gb csv
file ms sql database. of rows in not required insert. did not find filter rows while doing bulk insert.i using ms sql bulk insert command this. there option filter rows on mysql/mssql/oracle
on bulk insert?
bulk insert payroll.t_allowance 'f:\orders\lineitem.csv' ( fieldterminator =' |', rowterminator =' |\n' );
you can use openrowset
bulk
option:
select * openrowset(bulk 'f:\orders\lineitem.csv', formatfile= 'f:\orders\format.xml') ...
format.xml
file configure delimeters, column names, terminators etc: https://msdn.microsoft.com/en-us/library/ms178129.aspx
Comments
Post a Comment