Stored Procedures [dbo].[UpdateActiveSubscription]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@ActiveIDuniqueidentifier16
@TotalNotificationsint4
@TotalSuccessesint4
@TotalFailuresint4
Permissions
TypeActionOwning Principal
GrantExecuteRSExecRole
SQL Script
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
Uses