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)
 Schedule dts run based on import file date

Author  Topic 

hanney
Starting Member

5 Posts

Posted - 2006-04-20 : 05:35:06
Hello

I have a dts running with dtsrun from a batch file. The dts imports data into the database. I want to schedule the dts to run only when the last modified date of files to import is more recent than the last time the dts was run i.e. only import when some change has been made to files. I have a timestamp of import in database. Can somebody tell me how to do the scheduling?

Thanks,

kath

nr
SQLTeam MVY

12543 Posts

Posted - 2006-04-20 : 09:46:54
Can you move the files to an archive folder when you have processed them. Then you can just process everything that is in your folder.
Have a look at
http://www.nigelrivett.net/SQLTsql/s_ProcessAllFilesInDir.html
and
http://www.nigelrivett.net/SQLTsql/ImportTextFiles.html

You can just run your package instead of the SPs.

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -