|
|
|
SSCommitted
      
Group: Moderators
Last Login: Monday, August 13, 2012 1:06 PM
Points: 1,928,
Visits: 224
|
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 12:15 PM
Points: 1,443,
Visits: 711
|
|
Brian, Great video! Thanks!
Mark
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 7:08 AM
Points: 292,
Visits: 657
|
|
Brian,
I'm enjoying these videos, and learning some great stuff, keep them up.
Howard
|
|
|
|
|
SSC Rookie
      
Group: General Forum Members
Last Login: Monday, August 06, 2012 1:17 AM
Points: 34,
Visits: 150
|
|
Warning! Brian does point out that this technique may be no good if the file name needs to be known at a later stage in the package becuase the time will have changed (eg you need FTP or email the file somewhere), but doesn't explain how to fix this. My solution (I'm no expert though, so there might be a better way), is to create a package-level string variable, and at the start of the package use a script to set the value of the variable to be the required path and file name (including the time stamp). This variable can then be used to create the file and then subsequently for an FTP or email (or whatever) task.
Cheers - Graham
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, May 13, 2013 7:08 AM
Points: 292,
Visits: 657
|
|
Brian did show us how to just user the date part for the file name and in most cases that would probably surfice, however, some packages may run into the next day so setting a package variable a the start would be a good idea.
|
|
|
|
|
SSCommitted
      
Group: Moderators
Last Login: Monday, August 13, 2012 1:06 PM
Points: 1,928,
Visits: 224
|
|
You're right! If the package runs at 11:30PM and then tries to archive the file at 12:30 AM using my expression would fail for the archive, saying it can't find the file. One way around that is to lock in the expression on a variable instead using the EvaluateAsExpression property on the variable then tie that variable to the file name or by using a Script Task.
Brian Knight Free SQL Server Training Webinars
|
|
|
|