UFN_SITEID_MAPFROM_MEMBERSHIPPROGRAMID

Return

Return Type
uniqueidentifier

Parameters

Parameter Parameter Type Mode Description
@MEMBERSHIPPROGRAMID uniqueidentifier IN

Definition

Copy

create function [BBDW].[UFN_SITEID_MAPFROM_MEMBERSHIPPROGRAMID]
  (  
    @MEMBERSHIPPROGRAMID uniqueidentifier  
  )   
  returns uniqueidentifier
    as  

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