Solved

bluk insert skip header

Posted on 2004-09-16
1
594 Views
Last Modified: 2012-05-05
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
Comment
Question by:running32
1 Comment
 
LVL 10

Accepted Solution

by:
Jay Toops earned 125 total points
ID: 12077274
youd use the firstrow parameter

example

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

Jay
0

Featured Post

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now