UFN_REVENUETRIBUTE_GETNAME

Return

Return Type
nvarchar(255)

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN

Definition

Copy


                create function dbo.UFN_REVENUETRIBUTE_GETNAME
                (
                    @ID uniqueidentifier
                )
                returns nvarchar(255)
                with execute as caller
                as
                begin
                    declare @NAME nvarchar(255);

                    select 
                        @NAME = TRIBUTE.TRIBUTETEXT 
                    from 
                        dbo.REVENUETRIBUTE
                    inner join
                        dbo.TRIBUTE on REVENUETRIBUTE.TRIBUTEID = TRIBUTE.ID
                    where 
                        REVENUETRIBUTE.ID = @ID;

                    return coalesce(@NAME, '');
                end