USP_DATAFORMTEMPLATE_VIEW_FAFNFGCAMPAIGNLEVEL
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@DATALOADED | bit | INOUT | |
@SUMDONORS | int | INOUT | |
@DONORSGOAL | int | INOUT | |
@SUMPARTICIPANTS | int | INOUT | |
@PARTICIPANTSGOAL | int | INOUT | |
@SUMGROUPS | int | INOUT | |
@GROUPSGOAL | int | INOUT | |
@SUMCOMMUNICATIONS | int | INOUT | |
@COMMUNICATIONSGOAL | int | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_FAFNFGCAMPAIGNLEVEL
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@SUMDONORS int = null output,
@DONORSGOAL int = null output,
@SUMPARTICIPANTS int = null output,
@PARTICIPANTSGOAL int = null output,
@SUMGROUPS int = null output,
@GROUPSGOAL int = null output,
@SUMCOMMUNICATIONS int = null output,
@COMMUNICATIONSGOAL int = null output
)
as
set nocount on;
-- be sure to set this, in case the select returns no rows
set @DATALOADED = 0;
-- populate the output parameters, which correspond to fields on the form. Note that
-- we set @DATALOADED = 1 to indicate that the load was successful. Otherwise, the system
-- will display a "no data loaded" message.
select @DATALOADED = 1,
@DONORSGOAL = L.DONORSGOAL,
@PARTICIPANTSGOAL = L.PARTICIPANTSGOAL,
@GROUPSGOAL = L.GROUPSGOAL,
@COMMUNICATIONSGOAL = L.COMMUNICATIONSGOAL,
@SUMDONORS = VL.TOTALDONOR,
@SUMPARTICIPANTS =VL.TOTALPARTICIPANT,
@SUMGROUPS = VL.TOTALGROUP,
@SUMCOMMUNICATIONS = VL.TOTALCOMMUNICATIONSENT
from dbo.FAFNFGCAMPAIGNLEVEL L (nolock)
left join dbo.V_NFGLEVEL_SUMMARYINFO VL (nolock) on L.ID = VL.ID
where L.ID = @ID
return 0;