fnGetNetGroup_NetAccountsCount
Return
Return Type |
---|
int |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@NetGroupID | int | IN |
Definition
Copy
CREATE FUNCTION dbo.fnGetNetGroup_NetAccountsCount
(
@NetGroupID int
)
RETURNS int
BEGIN
RETURN(
SELECT Count(ngr.ID)
FROM [NetGroupRelation] ngr
INNER JOIN [NetAccount] na on na.ID = ngr.NetAccountID
WHERE
ngr.NetGroupID = @NetGroupID AND
(ngr.BlockedID IS NULL or ngr.BlockedID < 1) AND
(na.Deleted IS NULL or na.Deleted = 0) AND
(na.LockedOut IS NULL or na.LockedOut = 0) AND
(ngr.Confirmation IN (1,2,3))
)
END