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.
Author |
Topic |
Leigh79
Starting Member
28 Posts |
Posted - 2008-06-18 : 10:47:36
|
Hi GuysI am trying to build a DTS package that has a few steps and I'm not really sure of the best way to do this, here's what I'm trying to achieve:1. I have a file which is uploaded onto the server on a daily basis by an external client, the file name changes dynamically.2. The information within the file (xls) is imported into a pre-existing table in the database.3. The new information has historical information appended to it via an SQL Task.4. Once sucessfully completed, the file is then moved to an archive folder.The real challenge I'm having is the fact that the file's name changes dynamically, this can be either date or user based so there is no template as such. As far as importing the data and updating the data I'm okay with.Can anyone point me in the right direction?ThanksLeigh |
|
Hommer
Aged Yak Warrior
808 Posts |
Posted - 2008-06-18 : 11:37:14
|
You have to have something that is a constant to fall back to. For instance, the file will always show up in a given folder on a fixed path, and the format of the file wouldn't change. If that is the case, you need to detect the arrival of the file, then rename it to a predetermined name, which is the source of your DTS, and fire off the DTS. |
|
|
Leigh79
Starting Member
28 Posts |
Posted - 2008-06-18 : 11:46:45
|
Hi HommerThanks for getting back to me, the file will always be uploaded to the same folder, it's just the name of the file that will constantly change. |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-06-19 : 11:53:32
|
If file is uploaded into same folder you can try this method:-http://www.sqlservercentral.com/articles/DTS/importingthelatestfileinafolderviadts/1829/ |
|
|
|
|
|
|
|