UFN_DISCOUNT_NAMEEXISTS

Checks the DISCOUNT table for the given name

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@NAMETOCHECK nvarchar(100) IN

Definition

Copy


create function dbo.UFN_DISCOUNT_NAMEEXISTS
(
    @NAMETOCHECK nvarchar(100)
)
returns bit
with execute as caller
as begin
    if exists(select 1 from dbo.DISCOUNT where NAME = @NAMETOCHECK)
        return 1
    else
        return 0

    return 0
end