USP_DATAFORMTEMPLATE_VIEW_CAMPAIGNGOALCAMPAIGNINFO

The load procedure used by the view dataform template "Campaign Goal Campaign Info View Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@CAMPAIGNID uniqueidentifier INOUT Campaign ID
@CAMPAIGNNAME nvarchar(100) INOUT Campaign name
@CAMPAIGNHIERARCHYGOALID uniqueidentifier INOUT Campaign hierarchy goal ID

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_CAMPAIGNGOALCAMPAIGNINFO (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @CAMPAIGNID uniqueidentifier = null output,
                    @CAMPAIGNNAME nvarchar(100) = null output,
                    @CAMPAIGNHIERARCHYGOALID uniqueidentifier = null output
                ) as
                    set nocount on;

                    select
                        @DATALOADED=1,
                        @CAMPAIGNID=CAMPAIGN.ID,
                        @CAMPAIGNNAME=CAMPAIGN.USERID,
                        @CAMPAIGNHIERARCHYGOALID = CAMPAIGNHIERARCHYGOAL.ID
                    from 
                        dbo.CAMPAIGNGOAL
                    inner join 
                        dbo.CAMPAIGNHIERARCHYGOAL on CAMPAIGNGOAL.CAMPAIGNHIERARCHYGOALID = CAMPAIGNHIERARCHYGOAL.ID
                    inner join 
                        dbo.CAMPAIGN on CAMPAIGN.ID=CAMPAIGNGOAL.CAMPAIGNID
                    where 
                        CAMPAIGNGOAL.ID=@ID


                    return 0;