I need to import 3 text source files of 10 rows each. I've created the DTS package to perform these imports however now I want to add additional logic into the package. I want to check the source files to see if they are of the proper record count before performing following steps.
Note: The source text file names are named 300Data.txt, 400Data.txt and 500Data.txt with the first 3 char corresponding to the PK in tblMaster (destination).
1. test for a proper record count.
2. if record count = 10 then
delete recs for PK 300 in tblMaster
run the DTS transformation to bring new PK 300 records in
skip the import for this file - it's better to have the old compete records than new
What is the best way to build this logic into a DTS package? Also can I access the DTS object.ConnectionProperties("Data Source") property from within a package to simply repoint it to another text file to perform the next import?
I'm looking for the best book on SQL Server DTS with lots of good examples. Any suggestions would be greatly appreciated.