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 Problem

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-09-11 : 14:04:22
Dak writes "hello all

I have a huge text file with fieldterminator ',' and rowterminator ';'
i'm using bulk insert to insert the data in a table but i just want to skip the first column of text field and then use the rest of the text file

for eg.
abc, 1, aaa ; def, 2, bbb; ghi, 3, ccc;

so i just want to skip the first column abc, def, ghi... and use the other part of text file which is 1, aaa; 2, bbb; 3, ccc;

and i can't edit the text file

how should i do this with bulk insert

thanks "

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-09-11 : 14:27:10
You can create a bcp format file to skip any column you wish. The file format is detailed and demonstrated in Books Online under "bcp, format files". You can also use bcp to construct a format file dynamically, which you can then edit in a text editor like Notepad.

Go to Top of Page
   

- Advertisement -