UFN_OPPORTUNITYDESIGNATION_CAMPAIGNS

Returns campaigns tied to an opportunity designation.

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@OPPORTUNITYDESIGNATIONID uniqueidentifier IN

Definition

Copy


            CREATE function dbo.UFN_OPPORTUNITYDESIGNATION_CAMPAIGNS
            (
                @OPPORTUNITYDESIGNATIONID uniqueidentifier
            ) 
            returns table
            as return
                select
                    ODC.ID,
                    ODC.CAMPAIGNID,
                    ODC.CAMPAIGNSUBPRIORITYID,
                    C.NAME CAMPAIGNNAME
                from
                    dbo.OPPORTUNITYDESIGNATIONCAMPAIGN ODC
                    inner join dbo.CAMPAIGN C on ODC.CAMPAIGNID = C.ID
                where
                    ODC.OPPORTUNITYDESIGNATIONID = @OPPORTUNITYDESIGNATIONID