Bulk insert problem | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Bulk insert problem

Hi guys
I am using the Bulk insert command to import a flat file to the SQL server
2005.
My flat file contains about 1 million rows.
I have already created an empty table to insert the rows from the flat file. But I dont want to import the first row into my table in the database.
Is there a way I can give some some sort of condition in my bulk insert
command so that the first row from the flat file does not get imported?? Here is my bulk insert statement: BULK INSERT new1 FROM ‘f:My DocumentsflatFileBaselineone.txt’ WITH
(FIELDTERMINATOR = ‘,’)
Cheers
Mita
Hii,
To my knowledege i dont think there is any possibilty of giving a condtion while you do bulk copy..
becoz as the name suggests that its just bulk copying irrespective of ur choice of rows…
apart frm this if u want just a specific table then yes u can copy a specific table or vice-versa
using dts package ie using importexport wizard. Sidh next2none is what others feel about the maverick
Use the -F option and tell it to start on the second row…<br /><br /><br />BCP -h is your buddy. <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br /><br /><br />Edit:<br /><br />I almost never use Bulk Insert and do a bcp..my mistake.<br /><br />Use the FIRSTROW option to specify what row to start on.<br /><br />Books Online is your buddy for BULK INSERT. <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ />
Thanks Haywood…I just did what you suggested..I have solved my problem..
Cheers
]]>