Rhys666
Programmer
- May 20, 2003
- 1,106
I need to create a DTS Package / Series of sProc.'s that can iteratively perform file import and validation.
I want to iteratively import data contained in files into Sql Server (I can calculate the filename per file as they contain a formatted date). How can I set up DTS or a sProc to iteratively examine a source directory for files, then import each file, validate it and move the source file to either an errors or processed folder?
I can write the vbScript to do the file movement, I can write a DTS process or sProc to do the file import, it's the iterative processing all files that's killing me. Basically each file should be checked for existence, imported, validated ,the import table cleaned down, and then the source file moved to either a processed or errors directory... then the next file, etc. etc.
A file failing validation should stop the process as should any other failure. How do I make the DTS package iterate the files tho'?
Rhys
""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."
My Home
I want to iteratively import data contained in files into Sql Server (I can calculate the filename per file as they contain a formatted date). How can I set up DTS or a sProc to iteratively examine a source directory for files, then import each file, validate it and move the source file to either an errors or processed folder?
I can write the vbScript to do the file movement, I can write a DTS process or sProc to do the file import, it's the iterative processing all files that's killing me. Basically each file should be checked for existence, imported, validated ,the import table cleaned down, and then the source file moved to either a processed or errors directory... then the next file, etc. etc.
A file failing validation should stop the process as should any other failure. How do I make the DTS package iterate the files tho'?
Rhys
""Vampireware /n/, a project, capable of sucking the lifeblood out of anyone unfortunate enough to be assigned to it, which never actually sees the light of day, but nonetheless refuses to die."
My Home