fnGetNextListForRefresh
Return
Return Type |
---|
int |
Definition
Copy
CREATE FUNCTION [dbo].[fnGetNextListForRefresh] ()
RETURNS int AS
BEGIN
DECLARE @ListID int
SELECT TOP 1 @ListID = [ID]
FROM emaillist
WHERE AcquiredStatus IN (0)
and deleted=0 and datasourceid <> 303 --user defined list
--0 ready for refresh
--13 Processed lists that failed previous refresh
IF @@ROWCOUNT = 0
SELECT @ListID = 0
RETURN @ListID
END