
[dbo].[UpdateActiveSubscription]
CREATE PROCEDURE [dbo].[UpdateActiveSubscription]
@ActiveID uniqueidentifier,
@TotalNotifications int = NULL,
@TotalSuccesses int = NULL,
@TotalFailures int = NULL
AS
if @TotalNotifications is not NULL
begin
update ActiveSubscriptions set TotalNotifications = @TotalNotifications where ActiveID = @ActiveID
end
if @TotalSuccesses is not NULL
begin
update ActiveSubscriptions set TotalSuccesses = @TotalSuccesses where ActiveID = @ActiveID
end
if @TotalFailures is not NULL
begin
update ActiveSubscriptions set TotalFailures = @TotalFailures where ActiveID = @ActiveID
end
GO
GRANT EXECUTE ON [dbo].[UpdateActiveSubscription] TO [RSExecRole]
GO