fnGetSystemEmailListByQuery
Return
| Return Type |
|---|
| int |
Parameters
| Parameter | Parameter Type | Mode | Description |
|---|---|---|---|
| @QueryID | int | IN | |
| @BBSystemID | int | IN |
Definition
Copy
CREATE FUNCTION [dbo].[fnGetSystemEmailListByQuery]
(
@QueryID int,
@BBSystemID int
)
RETURNS int
AS
BEGIN
DECLARE @Result int
SELECT @Result = el.ID
FROM EmailList el
JOIN EmailList_Query elq
ON elq.EmailListID = el.ID
WHERE elq.QueryID = @QueryID
AND elq.BBSystem = @BBSystemID
AND el.SystemLIst = 1
RETURN @Result
END