UFN_CONSTITUENTMATCH_STREETNAMESCOREDEDUCTION_BYRESULT

Return

Return Type
table

Parameters

Parameter Parameter Type Mode Description
@STREETNAMERESULT tinyint IN

Definition

Copy


            create function dbo.UFN_CONSTITUENTMATCH_STREETNAMESCOREDEDUCTION_BYRESULT (
                @STREETNAMERESULT tinyint
            )
            returns table -- Writing as in-line table for performance vs scalar function

            with schemabinding
            as return
                -- non-match street names are significant enough to disqualify completely

                select
                    case @STREETNAMERESULT 
                        when 0 then 0 
                        when 1 then 5 
                        when 2 then 14 
                        when 3 then 31 
                        when 4 then 0 
                        when 5 then 18 
                        when 6 then 21 
                    end as DEDUCTION;