UFN_AUCTIONITEM_SITEVALIDFORAUCTION
Returns whether a site and auction combination is valid for an item.
Return
| Return Type |
|---|
| bit |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @SITEID | uniqueidentifier | IN | |
| @EVENTAUCTIONID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_AUCTIONITEM_SITEVALIDFORAUCTION
(
@SITEID uniqueidentifier,
@EVENTAUCTIONID uniqueidentifier
)
returns bit
as begin
declare @VALID bit = 0
if @SITEID is null or @EVENTAUCTIONID is null
set @VALID = 1
else if not exists (select SITEID from dbo.EVENTSITE where EVENTID = @EVENTAUCTIONID)
set @VALID = 1
else if exists (select SITEID from dbo.EVENTSITE where EVENTID = @EVENTAUCTIONID and SITEID = @SITEID)
set @VALID = 1
return @VALID
end