• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 608
  • Last Modified:

bluk insert skip header

I want to do a bulk insert on a csv file the problem is the file will always have a header how do i skip the header (1st line) and read in the rest of the docs.
0
running32
Asked:
running32
1 Solution
 
Jay ToopsCommented:
youd use the firstrow parameter

example

BULK INSERT tmpTable1 FROM 'c:\InputFile.csv' WITH (FIRSTROW=2, FORMATFILE='c:\FormatFile.txt');

Jay
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now