![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Howdy all, I'm trying to use DTS to output the results from a dynamically generated query into Excel and email the resultant .xls file directly to the requesting user (the users will be able to choose from a list of 'Reports' and supply values to be used in the WHERE clause). I've gotten everything to work up to the point of dynamically creating the table in DTS to allow DTS to copy the data from SQL to the .xls file (If I use the same base query, just changing the WHERE clause, it works like a charm) - does anyone know of a way to basically have SQL look at a query, create a table (dynamically) based on the fields in the query, and use that as the CREATE TABLE definition in DTS? It must be possible since the DTS Wizard seems to be able to do it on-the-fly when you select a table to output... My other option was to create a DTS package for each query-type, but I'd rather not do that if I can help it. Not sure how clear I've been.... Using SQLServer 2k, SP3. Thanks |
![]() |
| Thread Tools | |
| Display Modes | |
| |