UFN_REGISTRANT_VALIDGUESTOFID

Validates that the registrant is not a guest of a registrant already designated as a guest of another registrant.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@REGISTRANTID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_REGISTRANT_VALIDGUESTOFID
            (
                @REGISTRANTID uniqueidentifier = null                
            ) 
            returns bit with execute as caller
            as
            begin                
                if exists(select ID from dbo.REGISTRANT where ID = @REGISTRANTID and GUESTOFREGISTRANTID is not null)
                    return 0

                return 1
            end