Link to home
Start Free TrialLog in
Avatar of tmaususer
tmaususerFlag for United States of America

asked on

sql server agent jobs schedule question

Hello experts. I have a sql script the runs a stored procedure. The stored procedure clears and updates some rows in some tables. So when I run the sql script in visual studio, it shows me the results of what rows were updated. Example:
0 rows affected
0 rows affected
84 rows affected

I want to run this job as a scheduled job and I think I have it setup correctly. Except here is my question. When the scheduled job kicks off all I get is an email that the job was successful but I do not see what rows were affected like I do in visual studio. Is it possible to see what rows were affected via a schedule job and if so how?
ASKER CERTIFIED SOLUTION
Avatar of Kyle Abrahams, PMP
Kyle Abrahams, PMP
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
If that's something you need to know, I'd log it into a table then include a SELECT in the email to pull the relevant data for that email.  You could set up a process to automatically delete obsolete data from the table.
Avatar of tmaususer

ASKER

Thank you so much!