
September 9th, 2004, 08:35 AM
|
|
Registered User
|
|
Join Date: Aug 2004
Posts: 6
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Export queries to individual Excel files
I set up a DTS package using the export wizard to perform a multi table query that I am then exporting to Excel. The query is being sorted by the EmployeeID. . I would like to find a way to replace the reference to a specific EmployeeID (inside of the query) with a global variable and automatically export using the EmployeeID(global variable) as the name of the Excel file.
I set up a global variable named gEID and am populating the global variable with a query that extracts just the EmployeeIDs from the employees table. Can someone please suggest a way to loop through each EmployeeID as each query is run and Excel filed is exported?
Have seen several articles concerning looping but they usually applied to importing data not exporting to individual files.
|