UFN_DISCOUNT_HASCONSTITUENCY
Verifies if the discount has a constituency constraint.
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_DISCOUNT_HASCONSTITUENCY(@ID uniqueidentifier)
returns bit
with execute as caller
as begin
if exists ( select DISCOUNTCONSTITUENCY.ID
from dbo.DISCOUNTCONSTITUENCY
where DISCOUNTCONSTITUENCY.CONSTITUENCYSYSTEMNAMEID = @ID
)
return 1;
return 0;
end