UFN_FAFGETTOTALCOMMUNICATIONS
Get total communication count
Return
| Return Type |
|---|
| int |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @EVENTID | uniqueidentifier | IN | |
| @CLIENTUSERSID | int | IN |
Definition
Copy
create function dbo.UFN_FAFGETTOTALCOMMUNICATIONS
(
@EVENTID AS uniqueidentifier
,@CLIENTUSERSID AS INT = null
)
returns int
with execute as caller
as begin
DECLARE @TOTAL int
SET @TOTAL = 0
SELECT @TOTAL = count(*) FROM dbo.FAFCOMMUNICATIONSLOG WITH (NOLOCK)
WHERE EVENTID = @EVENTID AND CLIENTUSERSID = ISNULL(@CLIENTUSERSID,CLIENTUSERSID)
RETURN @TOTAL
end