UFN_VSECATEGORY_ROWEXISTS

Returns number of rows in the table for a given VSE category.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@VSECATEGORYCODE tinyint IN

Definition

Copy


            create function dbo.UFN_VSECATEGORY_ROWEXISTS(
                @VSECATEGORYCODE tinyint
                )
            returns bit
            with execute as caller
            as begin
                declare @ROWCOUNT int;

                select
                    @ROWCOUNT = count(ID)
                from
                    dbo.VSECATEGORY
                where 
                    VSECATEGORYCODE = @VSECATEGORYCODE
                if (@ROWCOUNT <= 1)
                    return 1;

                return 0;
            end