I have a Store proc to delete old records with Date variabe, basically I can select a date and run from SSIS Package
Where I use Sql task to run the Store proc. How can I get the record count which gets deleted,so that I can log into my sql server.
SO there are two options:
This will give you the actual results that have been deleted:
delete from TestTable output deleted.* where FirstName = 'test'
and This will give you the count of deleted records:
set nocount off delete from TestTable where FirstName = 'test2'