UFN_VSECONSTITUENCY_ALLROWSEXIST

Returns whether all of the VSE constituencies have a row included in the VSECONSTITUENCY table.

Return

Return Type
bit

Definition

Copy


            CREATE function dbo.UFN_VSECONSTITUENCY_ALLROWSEXIST()
            returns bit
            as begin
                if (select
                        count(ID)
                    from
                        dbo.VSECONSTITUENCY
                    where
                        VSECONSTITUENCY.VSECONSTITUENCYCODE in (
                            0,4,5,6,7,8,9,10,11,12,13,14,15,16,17)) = 15
                    return 1;

                return 0;
            end