UFN_RESOURCE_PERTICKETQUANTITY_GREATERTHANZERO
This function validates that the resource per ticket quantity for per ticket resources is greater than zero
Return
Return Type |
---|
int |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@RESOURCEID | uniqueidentifier | IN | |
@PERTICKETQUANTITY | int | IN |
Definition
Copy
create function dbo.UFN_RESOURCE_PERTICKETQUANTITY_GREATERTHANZERO(@RESOURCEID uniqueidentifier, @PERTICKETQUANTITY int)
returns int
as
begin
return (
select CASE
WHEN ISPERTICKETITEM = 1 and @PERTICKETQUANTITY <= 0 THEN 0
ELSE 1
END
from RESOURCE
where ID = @RESOURCEID
)
end