I need a Transact-SQL to start a SQL Server Agent job (using "exec sp_start_job @job_name='jjj'"
and then wait until the job is finished, avoiding to read system tables directly. (for SQL 2000 and 7.0)
In other words, I'd like to wait until current_execution_status in sp_help_job is different from 1, but I am not able to write this in Transact-SQL statements
In other words, I'd like to wait until current_execution_status in sp_help_job is different from 1, but I am not able to write this in Transact-SQL statements