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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2002-07-08 : 08:43:17
|
| Sri writes "Hi, I am exporting a table to an excel format. The package should change the name of the destination file everytime the package is executed (preceded by date). I need to deploy this urgently. Help !!!" |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-07-08 : 09:20:34
|
| You are going to need to write an ActiveX scripting task in your package to modify the destination. Take a look at the package collections in Books OnLine.<O> |
 |
|
|
MakeYourDaddyProud
184 Posts |
Posted - 2002-07-08 : 10:28:41
|
| Would that not require a DTS redeployment every time the parameter changes? I would have thought that you could programmatically use BCP with xp_cmdshell and a passed local variable into a stored procedure??? Your thoughts pageDaniel Small MIAPwww.danielsmall.com IT Factoring |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2002-07-08 : 10:43:51
|
| BCP can expert CSV for sure, but not native excel.I doesn't require a redeployment. You can dynamically set the destination (and just about everything about the package) using the collections and objects available. One difficulty is custom transforms, but if the auto-mapping is working, then its ok.There are 4 or 5 ways to solve Sri's problem. Custom scripting DTS is one way. Another (easier) way may be to export to the same file every day and xp_cmdshell out to rename it with today's date or something...<O> |
 |
|
|
|
|
|