USP_REPORT_MEMBERSHIPBATCHEXCEPTIONREPORT
Returns the data necessary for the Membership Batch Exception Report.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BATCHID | uniqueidentifier | IN |
Definition
Copy
create procedure dbo.USP_REPORT_MEMBERSHIPBATCHEXCEPTIONREPORT
(
@BATCHID uniqueidentifier
) with execute as owner
as
begin
set nocount on;
declare @TABLENAME nvarchar(128) = dbo.[UFN_BATCH_GETREPORTTABLENAME](@BATCHID, 1);
declare @SELECTFROMBATCHTABLESQL nvarchar(850) =
N'set nocount on;' + nchar(13) +
N'select' + nchar(13) +
N' [' + @TABLENAME + '].[ID], ' + nchar(13) +
N' [' + @TABLENAME + '].[MEMBERSHIPPROGRAMNAME], ' + nchar(13) +
N' [' + @TABLENAME + '].[MEMBERS], ' + nchar(13) +
N' [' + @TABLENAME + '].[REASON] ' + nchar(13) +
N'from ' + nchar(13) +
N' dbo.[' + @TABLENAME + N'];';
exec sp_executesql @SELECTFROMBATCHTABLESQL;
end