UFN_CONSTITUENTMATCH_FIRSTNAMESCOREDEDUCTION_BYRESULT
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@FIRSTNAMERESULT | tinyint | IN |
Definition
Copy
create function dbo.UFN_CONSTITUENTMATCH_FIRSTNAMESCOREDEDUCTION_BYRESULT (
@FIRSTNAMERESULT tinyint
)
-- Writing as in-line table for performance vs scalar function
returns table
with schemabinding
as return
-- non-match first names are significant enough to disqualify completely
-- spouses could have everything the same except first name
select
case @FIRSTNAMERESULT
when 0 then 0
when 1 then 3
when 2 then 15
when 3 then 31
when 4 then 0
when 5 then 1
when 6 then 3
end as DEDUCTION