The Job Step Properties of SQL Server Agent job in SSMS does not match generated TSQL code
when I select "Script Job as create to new query window" for the same Agent job.
In the job I am looking at, the job step properties screens do NOT show a database name, just the TSQL command
being run. However, when I look at the TSQL generated by the "Script Job as create..." for these job steps,
the sp_add_jobstep command options DO show a database_name. For example:
EXEC @ReturnCode = msdb.dbo.sp_add_jobstep @job_id=@jobId, @step_name=N'Datawhs Update Stats',
However, when I look at the Job Step Properties of this step in the Agent job, the "Database:" entry
is not filled in, only the "Command:" entry (in this case sp_updatestats). How can the job step properties
have a blank database name and yet the sp_add_jobstep entry have it filled in?