I need to execute a store procedure and save the results into an excel file. These events are scheduled to happen at a specific time. I have the parameters for the store procedure saved, just need to pass it in to the DTS package... is this possible?
If it's a pretty simple export, have you tried using the Import/Export wizard in SQL Enterprise Manager to do it for you? You can enter the SQL Command as EXEC YourSPName and select the output type as Excel.
__________________ Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"
It is easy with the IMport/Export wizard. But I need to do this by code. So what needs to happen is that I need to generate an excel file that are the results of a query given a set of parameters at a specific time. Any ideas?
Well, I decided that I am just going to execute my store proc, get the result back and generate the excel file by code. After doing some research on the DTS package, it just seems to complicated...
What do you mean 'by code'? What sort of code? DTS Packages are complex things that contain a number of building blocks, links & steps and bits of code, including SQL and VBScript...
You can create a DTS package very easily using the Import/Export wizard (just select the option at the end to save to DTS) then you can either shcedule it using the SQL Scheduler or run it manually.
__________________ Minaki Serinde MCP
"Wow, Linux is nearly on-par with Windows ME!"