UFN_CAMPAIGN_DESIGNATIONSBYSELECTION
This function returns the designations from a selection except those that are already on a campaign.
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@CAMPAIGNID | uniqueidentifier | IN | |
@IDSETREGISTERID | uniqueidentifier | IN | |
@CURRENTAPPUSERID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_CAMPAIGN_DESIGNATIONSBYSELECTION (
@CAMPAIGNID uniqueidentifier,
@IDSETREGISTERID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier
) returns table
as return
select
DESIGNATION.ID DESIGNATIONID
from
dbo.UFN_IDSETREADER_GETRESULTS_GUID(@IDSETREGISTERID) DESIGNATION
where
DESIGNATION.ID not in (select DESIGNATIONCAMPAIGN.DESIGNATIONID from dbo.DESIGNATIONCAMPAIGN where DESIGNATIONCAMPAIGN.CAMPAIGNID = @CAMPAIGNID) and
dbo.UFN_DESIGNATION_USERHASSITEACCESS(DESIGNATION.ID, @CURRENTAPPUSERID) = 1