![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi folks, I'm just looking for helpful general pointers, not the actual solution or any code I've got to import about 10 files or so into a staging post database and my aim is simple. If the file is one I haven't imported before (and is therefore a newer version) I wish to import it (i.e execute the importing DTS package for that file) if it's one I have imported (i.e it's old or the same) I don't want to import it again I will have a table that I can test the last imported date for that filename any broad ideas on how to do this checking logic. I'm thinking VBscript, the FileSystemObject and some branching logic...any better suggestions? Regards and Thanks in advance CharlesA |
#3
| |||
| |||
|
|
Hello CharlesA, I would loop over the files. Grab the date Compare with the tabled values if date == new then import and enter the details in the log if date == older than that in the table - get rid. Here is some looping code that you can add your own "middle bit" to. http://www.sqldts.com/default.aspx?246 Allan Mitchell www.SQLDTS.com www.SQLIS.com www.Konesans.com Hi folks, I'm just looking for helpful general pointers, not the actual solution or any code I've got to import about 10 files or so into a staging post database and my aim is simple. If the file is one I haven't imported before (and is therefore a newer version) I wish to import it (i.e execute the importing DTS package for that file) if it's one I have imported (i.e it's old or the same) I don't want to import it again I will have a table that I can test the last imported date for that filename any broad ideas on how to do this checking logic. I'm thinking VBscript, the FileSystemObject and some branching logic...any better suggestions? Regards and Thanks in advance CharlesA |
#4
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |