UFN_DESIGNATIONVSESUBCATEGORY_ISVALID

Ensures that a VSE category and VSE subcategory are properly paired.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@VSECATEGORYID uniqueidentifier IN
@VSESUBCATEGORYID uniqueidentifier IN

Definition

Copy


        create function dbo.UFN_DESIGNATIONVSESUBCATEGORY_ISVALID
        (
            @VSECATEGORYID uniqueidentifier,
            @VSESUBCATEGORYID uniqueidentifier
        )
        returns bit
        with execute as caller
        as begin

            declare @matched bit = 0;

            select 
                @matched = count(*)
            from
                dbo.VSESUBCATEGORY
            where
                ID = @VSESUBCATEGORYID
                and
                VSECATEGORYID = @VSECATEGORYID

            return @matched
        end