USP_SIMPLEDATALIST_PDACCOUNTCODEMAPPROGRAM

Returns a list of programs and an all programs entry.

Definition

Copy


create procedure dbo.USP_SIMPLEDATALIST_PDACCOUNTCODEMAPPROGRAM as
    select
        VALUE,
        LABEL
    from (
        select
            '99999999-9999-9999-9999-999999999999' as VALUE,
            'All programs' as LABEL,
            0 as SEQUENCE

        union all

        select
            ID as VALUE
            NAME as LABEL,
            1 as SEQUENCE
        from
            dbo.PROGRAM
        where
            ISACTIVE = 1
    ) as PROGRAMS
    order by
        SEQUENCE, LABEL;