January 18, 2007 at 3:16 pm
hi does anybody no how i can create a dts package that runs a store proc and sends the results to a file.
January 18, 2007 at 4:05 pm
Use the ExecuteSQL task to execute the stored procedure. Use a rowset output parameter to store the result set in a global variable. Upon success of the ExecuteSQL task, run an ActiveX script task to stream the rowset variable contents to a text file.
January 19, 2007 at 6:24 am
I created a very simple package with two connections: one sql server, one text destination. I then created a transformation from the sql to the text. I set the source to a query that uses the stored procedure.
Russel Loski, MCSE Business Intelligence, Data Platform
January 19, 2007 at 1:41 pm
Yep, that works too. Russel's solution will be simpler to write. If all you need to do is send the SP results to a file and that file name can be the same each time, use Russel's solution. If you need to have the ability to dynamically change the file name or to use the SP results anywhere else in the package, I would go the ActiveX route.
January 19, 2007 at 1:46 pm
John summarized it very well.
Russel Loski, MCSE Business Intelligence, Data Platform
January 21, 2007 at 1:15 pm
Wicked! cheers guys! didnt think it was that simple
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply