USP_SIMPLEDATALIST_SPONSORSHIPREPORTDIMENSIONINTEGER

Returns a list of dimension values based on the passed in parameter

Parameters

Parameter Parameter Type Mode Description
@DIMENSION tinyint IN DIMENSION

Definition

Copy


CREATE procedure dbo.USP_SIMPLEDATALIST_SPONSORSHIPREPORTDIMENSIONINTEGER(
 @DIMENSION tinyint = 0
 )as
   -- Payment Interval

   select 
      VALUE
      LABEL
   from (select 0 as VALUE, 'Annually' as LABEL
         union all
         select 1 as VALUE, 'Semi-annually' as LABEL
         union all
         select 2 as VALUE, 'Quarterly' as LABEL
         union all
         select 6 as VALUE, 'Bimonthly' as LABEL
         union all
         select 3 as VALUE, 'Monthly' as LABEL
         union all
         select 7 as VALUE, 'Semi-monthly' as LABEL
         union all
         select 8 as VALUE, 'Biweekly' as LABEL
         union all
         select 9 as VALUE, 'Weekly' as LABEL      
         ) PAY_INTERVAL
   where @DIMENSION in (4, 14, 23)
   union all
   -- Automatic Payment Method

   select 
      VALUE
      LABEL
   from (select 2 as VALUE, 'Credit Card' as LABEL
         union all
         select 3 as VALUE, 'Direct Debit' as LABEL
         union all
         select 9 as VALUE, 'None' as LABEL) PAY_TYPE
   where @DIMENSION = 5
             union all
            -- Status?  Eligibility

       select
         VALUE,
           LABEL
       from ( select 1 as VALUE, 'Eligible' as LABEL
            union all
            select 2 as VALUE, 'Ineligible' as LABEL
                    union all
                    select 0 as VALUE, 'Pending' as LABEL)
            ELIGIBILITY
       where @DIMENSION = 11
       union all
       -- Gender

       select
          VALUE,
            LABEL
       from (select 0 as VALUE, 'Unknown' as LABEL
            union all
            select 1 as VALUE, 'Male' as LABEL
                    union all
                    select 2 as VALUE, 'Female' as LABEL)
                    GENDER
       where @DIMENSION = 9
       union all
       --Availability - Child

       select
           VALUE,
           LABEL
     from (select 0 as VALUE, 'Available' as LABEL
            union all
            select 1 as VALUE, 'Reserved' as LABEL
                    union all
                    select 2 as VALUE, 'Unavailable' as LABEL)
                    AVAILABILITY
    where @DIMENSION = 10
    union all
    -- payment method

    select 
      VALUE
      LABEL
    from (select 0 as VALUE, 'Cash' as LABEL
         union all
         select 1 as VALUE, 'Check' as LABEL
         union all
         select 2 as VALUE, 'Credit Card' as LABEL
         union all
         select 3 as VALUE, 'Direct Debit' as LABEL
         union all
         select 4 as VALUE, 'Stock' as LABEL
         union all
         select 5 as VALUE, 'Property' as LABEL
         union all
         select 6 as VALUE, 'Gift-in-kind' as LABEL
         union all
         select 10 as VALUE, 'Other' as LABEL
        ) PAY_TYPE
   where @DIMENSION = 17
        union all
    -- Project Status

    select
           VALUE,
           LABEL
     from ( select 1 as VALUE, 'Open' as LABEL
             union all
            select 2 as VALUE, 'Closed' as LABEL)
            STATUS
       where @DIMENSION = 16
    union all
    -- Availability  Project inventory

           select
           VALUE,
           LABEL
     from (select 0 as VALUE, 'Available' as LABEL
            union all
                    select 2 as VALUE, 'Unavailable' as LABEL)
                    AVAILABILITYPROJECT
    where @DIMENSION = 22