Solved

bluk insert skip header

Posted on 2004-09-16
1
596 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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.

809 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