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)
 DTS Package data load problem

Author  Topic 

allan_oli
Starting Member

6 Posts

Posted - 2005-10-05 : 12:23:56
Hi,

I was wondering if anyone could help with a problem i have with my DTS Package?

I am trying to load data from text files into tables into my database. Unfortunately, the data in one file is not in the correct format as my customer has supplied 20 rows instead of the 19 required. However, this is only for one row, and 1 million are correct with 19 rows. Asking the customer to clean up the format of the data is no longer an option.

Basically, i would like to know if there is a way to make the DTS Package output the offending row to a text file, and continue with the load of the rest of the data. Currently, because one row is bad, the whole lot is rejected. I know in Oracle you can use a discard file, is there a SQL Server alternative?

Thanks in advance

Oli

nr
SQLTeam MVY

12543 Posts

Posted - 2005-10-06 : 04:00:29
?? WHy are you using dts to load text files?

If you are using bcp it has an option to allow errors and you can set the threshhold beore it fails the import.
Avoid dts and you will learn the options available and also be able to import a file with a variable number of columns in the rows.

==========================================
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
   

- Advertisement -