UFN_SITEID_MAPFROM_CAMPAIGNID

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@CAMPAIGNID uniqueidentifier IN

Definition

Copy

create function [BBDW].[UFN_SITEID_MAPFROM_CAMPAIGNID]  
  (  
    @CAMPAIGNID uniqueidentifier  
  )   
  returns table
    as  

    return

      select cs.[SITESYSTEMID] as [SITEID]
      from BBDW.[DIM_CAMPAIGN] c
      left join BBDW.[FACT_CAMPAIGNSITE] cs on c.[CAMPAIGNDIMID] = cs.[CAMPAIGNDIMID]
      where c.[CAMPAIGNSYSTEMID] = @CAMPAIGNID