USP_REPORT_BBNCMEMBERSHIPBATCHEXCEPTIONREPORT

Returns the data necessary for the Blackbaud Internet Solutions Membership Batch Control report.

Parameters

Parameter Parameter Type Mode Description
@BATCHID uniqueidentifier IN

Definition

Copy


            CREATE procedure dbo.USP_REPORT_BBNCMEMBERSHIPBATCHEXCEPTIONREPORT
            (
                @BATCHID uniqueidentifier
            )
            with execute as owner
            as
                set nocount on;

                declare @TABLENAME nvarchar(128);

                select @TABLENAME = dbo.UFN_BATCH_GETREPORTTABLENAME(@BATCHID, 1)

                declare @SQLTOEXEC nvarchar(300);

                set @SQLTOEXEC = N'set nocount on;            
                    select 
                        ID, MEMBERSHIPPROGRAM, MEMBERSHIPLEVEL, PRIMARYMEMBER, REASON
                    from dbo.' + @TABLENAME;
                exec sp_executesql @SQLTOEXEC;