Skipping header row while doing bulk inset

  • SQL server

    I have a data file with first row as header data and from second row onwards actual data.The column delimiter is '|' and row delimiter '\n' . When i do a bulk insert into SQL table from a flat file,the header record/row in the file should be omitted.The header record does not have delimiters.

    pls provide a solution for this

  • BULK INSERT YourTable FROM 'YourFile' WITH (FIRSTROW=2, FIELDTERMINATOR='|')

    --
    Adam Machanic
    whoisactive

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply