A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
You can set up a format file for the field mapping. Say that your CSV files has data for columns 1, 3, 4, 5, 7 and 10:
9.0
6
1 SQLVARCHAR 0 0 "," 1 col1 ""
2 SQLVARCHAR 0 0 "," 3 col3 ""
3 SQLVARCHAR 0 0 "," 4 col4 ""
4 SQLVARCHAR 0 0 "," 5 col5 ""
5 SQLVARCHAR 0 0 "," 7 col6 ""
6 SQLVARCHAR 0 0 "\r\n" 10 col10 ""
The command would be:
BULK INSERT MyTable FROM 'C:\temp\MyCSVFile.txt'
WITH (FORMATFILE = 'C:\temp\MyCSVFile.fmt')