USP_REPORT_JOBS

Stored procedure as datasource for filtering jobs.

Definition

Copy


            create procedure dbo.USP_REPORT_JOBS
            as
                set nocount on;

                begin try
                    select ID, NAME
                    from dbo.JOB
                    union all
                    select null as ID, 'All Jobs' as Name
                    order by NAME, ID
                end try

                begin catch
                    exec dbo.USP_RAISE_ERROR;
                    return 1;
                end catch

                return 0;