USP_REPORT_GLACCOUNTBATCHCONTROL
Returns the data necessary for the account batch control report.
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@BATCHID | uniqueidentifier | IN |
Definition
Copy
create procedure dbo.USP_REPORT_GLACCOUNTBATCHCONTROL
(
@BATCHID uniqueidentifier
)
as
set nocount on;
declare @TABLENAME nvarchar(128);
select @TABLENAME = dbo.UFN_BATCH_GETREPORTTABLENAME(@BATCHID, 0)
declare @SQLTOEXEC nvarchar(400);
set @SQLTOEXEC = N'set nocount on;
select
ID, ACCOUNTNUMBER, ACCOUNTDESCRIPTION
from dbo.' + @TABLENAME + ' order by ACCOUNTNUMBER';
exec sp_executesql @SQLTOEXEC;