Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Bulk Insert Skip Last Row

Author  Topic 

hariharanst
Starting Member

1 Post

Posted - 2008-12-03 : 06:54:55
Hi all,
I am using Bulk Insert Command to upload a file content to a table.
File contains a Header Row and a Footer Row.
Using FIRSTROW=2, i can skip the first row.
How to Skip the LastRow of the File ?
LASTROW = n-1, i tried. But Note that i am not aware of the number of lines 'n' in the file.
It has to work dynamically ?
Please give a solution....



Regards,
Hariharan ST

sakets_2000
Master Smack Fu Yak Hacker

1472 Posts

Posted - 2008-12-03 : 10:40:21
I don't think there is an easy switch or parameter to do this. What you can do is, use bcp to import. The footer would most probably get rejected, but that wouldn't fail the entire load since bcp by default ignores 10 rejections.
Go to Top of Page
   

- Advertisement -