UFN_SITEID_MAPFROM_SOURCECODEID

Return

Return Type
uniqueidentifier

Parameters

Parameter Parameter Type Mode Description
@SOURCECODEID uniqueidentifier IN

Definition

Copy

create function [BBDW].[UFN_SITEID_MAPFROM_SOURCECODEID]
  (  
    @SOURCECODEID uniqueidentifier  
  )   
  returns uniqueidentifier
    as  

    begin
      declare @ID uniqueidentifier;
      select @ID = case when ms.[SITESYSTEMID] <> '00000000-0000-0000-0000-000000000000' then ms.[SITESYSTEMID] else null end 
      from BBDW.[DIM_MARKETINGSOURCECODE] ms
      where ms.[MARKETINGSOURCECODESYSTEMID] = @SOURCECODEID
      return @ID
    end