Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ratinakage
Starting Member
16 Posts |
Posted - 2006-02-27 : 10:20:00
|
| Hi all.I am trying to update the last job step in a job, before adding a final job step to the end of the job. In the below example, the last job step number is 5. but this is not always the case. Is there a way to ask SQL to update the last job step??Thanks.exec msdb..sp_update_jobstep @job_name = N'The Office - Batch Process - Data Summary Base Tables', @step_id = 5, @on_success_action = 3 , @on_fail_action = 3GO |
|
|
ratinakage
Starting Member
16 Posts |
Posted - 2006-02-28 : 03:30:11
|
| no one...? |
 |
|
|
RickD
Slow But Sure Yak Herding Master
3608 Posts |
Posted - 2006-02-28 : 05:35:28
|
If you want to find the last step..select j.name, max(step_id)from msdb..sysjobsteps sinner join msdb..sysjobs jon j.job_id = s.job_idgroup by j.name |
 |
|
|
|
|
|