May 16, 2007 at 11:28 am
How do I display the number of rows affected by a delete or update operation done through a DTS package. I have tried to set a @variablea = to @@rowcount after the execution of the delete or update operation, and then
select 'number of rows deleted = ' @variablea, but my select is ignored.
Any ideas?
May 16, 2007 at 11:40 am
Where do you want it to be displayed? You could create a log table and insert the data in there and have it for reference later...
Ben Sullins
bensullins.com
Beer is my primary key...
May 16, 2007 at 12:00 pm
I would like to display it on the out put from the package execution: This is what I currently receive
****************************************************************************************************
The execution of the following DTS Package succeeded:
Package Name: Test Trigger_Delete
Package Description: test
Package ID: {2264B686-0291-460F-8080-C409E0A03264}
Package Version: {66761AE6-83E4-49D1-8D65-AD23480AA75C}
Package Execution Lineage: {78D5E102-7CF5-46AF-96B5-42267346E7FC}
Executed On: xxxxxxx
Executed By: jerrickdh
Execution Started: 5/16/2007 12:48:38 PM
Execution Completed: 5/16/2007 12:48:45 PM
Total Execution Time: 6.953 seconds
Package Steps execution information:
Step 'DTSStep_DTSExecuteSQLTask_1' succeeded
Step Execution Started: 5/16/2007 12:48:38 PM
Step Execution Completed: 5/16/2007 12:48:45 PM
Total Step Execution Time: 6.812 seconds
Progress count in Step: 0
May 17, 2007 at 8:49 am
I've taken the way suggested by Ben Sullins. The selected count does not go into a local variable but into a global variable specified as an output parameter. In a subsequent step I insert that global variable into a table, where it is available for post-package processes.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy