USP_BBNC_GETDESIGNATIONCAMPAIGNS

Gets the data for a designation campaigns to satisfy a GetFundData request.

Parameters

Parameter Parameter Type Mode Description
@BBNCID int IN

Definition

Copy


            CREATE procedure dbo.USP_BBNC_GETDESIGNATIONCAMPAIGNS
            (
                @BBNCID int
            )
            as
                set nocount on;

                select
                    CAMPAIGN.NAME,
                    CAMPAIGN.DESCRIPTION,
          coalesce((select DESCRIPTION from dbo.CAMPAIGNTYPECODE where CAMPAIGNTYPECODE.ID = CAMPAIGN.CAMPAIGNTYPECODEID), '') as [CAMPAIGNTYPE]
                from
                    dbo.BBNCDESIGNATIONIDMAP
                    inner join dbo.DESIGNATION on BBNCDESIGNATIONIDMAP.DESIGNATIONID = DESIGNATION.ID
                    inner join dbo.DESIGNATIONCAMPAIGN on DESIGNATION.ID = DESIGNATIONCAMPAIGN.DESIGNATIONID
                    inner join dbo.CAMPAIGN on DESIGNATIONCAMPAIGN.CAMPAIGNID = CAMPAIGN.ID
                where
                    BBNCDESIGNATIONIDMAP.ID = @BBNCID;