UFN_DISCOUNT_GETAPPLIESTOCODE

Returns the APPLIESTOCODE field of a given discount

Return

Return Type
tinyint

Parameters

Parameter Parameter Type Mode Description
@DISCOUNTID uniqueidentifier IN

Definition

Copy


create function dbo.UFN_DISCOUNT_GETAPPLIESTOCODE(@DISCOUNTID uniqueidentifier)
returns tinyint
with execute as caller
as begin
    return (select top(1) APPLIESTOCODE from dbo.DISCOUNT where ID = @DISCOUNTID)
end