Solved

bluk insert skip header

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

786 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