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 |
mcp111
Starting Member
44 Posts |
Posted - 2006-03-09 : 13:30:50
|
I have a dts package that needs to run on a different date every month. The dates are stored in a sql server table. How can I schedule this package? |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-03-09 : 13:39:31
|
Here's one way:DECLARE @Date datetimeSELECT @Date = YourColumnFROM YourTableIF @Date = CONVERT(varchar(10), GETDATE(), 101) EXEC master.dbo.xp_cmdshell 'dtsrun.exe ...'So you'll use xp_cmdshell to run the DTS package. If the date in the table is today's date, then execute it. Otherwise, do nothing.Tara Kizeraka tduggan |
 |
|
|
|
|