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
 Import/Export (DTS) and Replication (2000)
 BULK INSERT Delimiters & Format File

Author  Topic 

sqlteamForummer
Starting Member

13 Posts

Posted - 2005-11-22 : 16:09:54
1)I am trying to Bulk Insert data from a text file into a table based on the Format File. In the data file, how can I successfully begin BULK INSERT only from the second row; the first row is just a heading.

2)The colums of data that exist in the text file are separated by uneven spaces. What delimiter should I use in order to make this feasible.

Thanks

nr
SQLTeam MVY

12543 Posts

Posted - 2005-11-22 : 20:38:15
1) see FIRSTROW in the bulk insert command.
2) Think you might be stuck unless there is a delimitter of fixed width fields.
have a look at
http://www.nigelrivett.net/SQLTsql/BCP_quoted_CSV_Format_file.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

sqlteamForummer
Starting Member

13 Posts

Posted - 2005-11-22 : 22:08:06
Thank you nr.
Go to Top of Page
   

- Advertisement -