![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I am very new to DTS, so excuse me if my question has already been asked a million times. I have a view that is a combination of many tables, and on a periodic basis, I would like to export this view to an excel document automatically. The problem lies in that the fields in this view change periodically depending on records in certain tables. (An asp script updates the view automatically). When I generate the the dts package, it seems to use all of the fields in the view that were there when the package is created. Is it possible to dynamically generate the DTS package based on the fields in the view when the backup to excel is performed? Thanks so much, I really appreciate any help! -Nelson Colwell |
#3
| |||
| |||
|
|
Why not have a view purely for you and have the definition never change so CREATE VIEW SelRows(col1,col2,col3) AS Definition This way the definition might change but your metadata for DTS will not. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#4
| |||
| |||
|
|
Allan, Thanks for the reply, but my issue is that I need the metadata to changed based on the fields currently in the view when I want to run my export. Is there any way to dynamically create the DTS package when I need to run it? My query is a very simple "SELECT * From MYVIEW", but the metadata will vary. Is there any way to accomplish this, maybe with a 3rd party application? Thanks! -Nelson "Allan Mitchell" <allan (AT) no-spam (DOT) sqldts.com> wrote Why not have a view purely for you and have the definition never change so CREATE VIEW SelRows(col1,col2,col3) AS Definition This way the definition might change but your metadata for DTS will not. -- ---------------------------- Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP) www.allisonmitchell.com - Expert SQL Server Consultancy. www.SQLDTS.com - The site for all your DTS needs. I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org |
#5
| |||
| |||
|
#6
| |||
| |||
|
|
Allan, Thanks again so much for taking the time to help me out. What I think I need to do is to retrive the defintion from the view and rebuild the source columns property and the transformation object like you mentioned. How would I go about retriving the defintion from the view dynamically? Would I then just edit the .bas DTS package file accordingly? Cheers, Nelson *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#7
| |||
| |||
|
#8
| |||
| |||
|
|
Allan, That package is exactly what I'm looking for. I'd like to email you privately, but your email address isn't listed in your post. My email address is nelson (AT) laser (DOT) net. Thanks a million times over! -Nelson *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
![]() |
| Thread Tools | |
| Display Modes | |
| |