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
 Transact-SQL (2000)
 Importing text files excluding lines

Author  Topic 

Caique
Starting Member

1 Post

Posted - 2010-12-15 : 03:20:22
I have an SAP report that I have to import. I used the Bulk Insert command, but this file report is big and have a lot off headers then i can't import it becouse the bulk insert returns a lot off erros, more then the 10000 suported by this command.
I wish you someone know how exclude lines in the Bulk Insert, or only import lines according to a clause, for example, only import the lines from txt files who started with '| 3'.
Anyone can help?

Thanks
Caique

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2010-12-15 : 11:28:44
Copy it all to a staging table, then filter it as needed while inserting into to live table.
Go to Top of Page
   

- Advertisement -