UFN_STEWARDSHIPPLANSTEP_VALIDTIMEZONE

Validates that time zones are entered only when time is entered.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@TIME UDT_HOURMINUTE IN
@TIMEZONENTRYID uniqueidentifier IN

Definition

Copy


CREATE function dbo.UFN_STEWARDSHIPPLANSTEP_VALIDTIMEZONE
(
    @TIME UDT_HOURMINUTE = null,
    @TIMEZONENTRYID uniqueidentifier = null
)
returns bit with execute as caller
as
begin
    if (@TIMEZONENTRYID is not null and (@TIME is null or @TIME = '')) 
    begin
        return 0;
    end

    return 1;

end