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)
 Source columns may vary.. what to do?

Author  Topic 

ds9
Starting Member

38 Posts

Posted - 2006-06-07 : 16:15:43
Hi ppl

I have a import data DTS that copies columns from a text file to a table. Part of the ActiveX script is like this:
...
DTSDestination('Name 1')=DTSSource('N1')
DTSDestination('Name 2')=DTSSource('N2')
DTSDestination('Name 3')=DTSSource('N3')
DTSDestination('Name 4')=DTSSource('N4')
...
My problem is that sometimes the source file doesn't have one of the columns (N2 for ex), and the DTS aborts. Is there any way to ignore or test this errors, inserting a NULL into the missing field for ex., and continuing execution of DTS?

Many thanks
DS9
   

- Advertisement -