UFN_MAPPING_BUILDCONTEXTRECORDID

Translation function for map instance search list.

Return

Return Type
nvarchar(108)

Parameters

Parameter Parameter Type Mode Description
@MAPENTITYID uniqueidentifier IN
@RECORDID uniqueidentifier IN
@ADDRESSID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_MAPPING_BUILDCONTEXTRECORDID(
                @MAPENTITYID uniqueidentifier,
                @RECORDID uniqueidentifier,
                @ADDRESSID uniqueidentifier = null
            ) returns nvarchar(108) as
            begin
                declare @MAPENTITYIDSTRING nvarchar(36);
                declare @RECORDIDSTRING nvarchar(36);
                declare @ADDRESSIDSTRING nvarchar(36);

                if @MAPENTITYID is null begin
                    set @MAPENTITYIDSTRING = '';
                end
                else begin
                    set @MAPENTITYIDSTRING = cast(@MAPENTITYID as nchar(36));
                end

                if @RECORDID is null begin
                    set @RECORDIDSTRING = '';
                end
                else begin
                    set @RECORDIDSTRING = cast(@RECORDID as nchar(36));
                end

                if @ADDRESSID is null begin
                    set @ADDRESSIDSTRING = '';
                end
                else begin
                    set @ADDRESSIDSTRING = cast(@ADDRESSID as nchar(36));
                end

                return @MAPENTITYIDSTRING + @RECORDIDSTRING + @ADDRESSIDSTRING;
            end;