UFN_SPONSORSHIPOPPORTUNITY_LOCATIONOPEN
Returns true if the sponsorship opportunity is in an open location.
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @ID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_SPONSORSHIPOPPORTUNITY_LOCATIONOPEN(
@ID uniqueidentifier
)
returns bit
with execute as caller
as begin
declare @LOCATIONSTATUS tinyint
select @LOCATIONSTATUS = SPONSORSHIPLOCATION.STATUSCODE
from dbo.SPONSORSHIPLOCATION
inner join dbo.SPONSORSHIPOPPORTUNITY on SPONSORSHIPOPPORTUNITY.SPONSORSHIPLOCATIONID = SPONSORSHIPLOCATION.ID
where SPONSORSHIPOPPORTUNITY.ID = @ID;
if @LOCATIONSTATUS = 2
return 0;
return 1;
end