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

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -