USP_SIMPLEDATALIST_SPONSORSHIPOPPORTUNITYDIMENSIONS

A simple list of sponsorship opportunity dimensions available for the sponsorship opportunity smart fields.

Parameters

Parameter Parameter Type Mode Description
@SPONSORSHIPOPPORTUNITYTYPECODE tinyint IN SPONSORSHIPOPPORTUNITYTYPECODE

Definition

Copy


create procedure dbo.USP_SIMPLEDATALIST_SPONSORSHIPOPPORTUNITYDIMENSIONS(
    @SPONSORSHIPOPPORTUNITYTYPECODE tinyint = 0
) as
    select 
        cast(ID as nvarchar(36)) as VALUE
        'Opportunity ' + DESCRIPTION as LABEL
    from dbo.SPONSORSHIPLOCATIONTYPECODE
    union all
    select DIMENSION as VALUE,
           DIMENSION as LABEL
    from (select 'Child age range' DIMENSION, 1 TYPE
          union all
          select 'Child disability/illness', 1 TYPE
          union all
          select 'Child gender', 1 TYPE
          union all
          select 'Project category', 2 TYPE) DIMENSIONS
    where TYPE = @SPONSORSHIPOPPORTUNITYTYPECODE
    order by LABEL