Stored Procedures [dbo].[XLedgerCheckForTransactionUploadErrors]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@xledgerJournalEntryBatchIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
CREATE PROCEDURE [dbo].[XLedgerCheckForTransactionUploadErrors]
    @xledgerJournalEntryBatchId int
as
begin
    set nocount on

    -- Use the table of failures to locate the details of each failure
    -- linked to the specific batch we are monitoring.
    select
        Id = XLedgerTransactionUploadFailure.XLedgerTransactionUploadFailureId,
        [Description] = XLedgerTransactionUploadFailure.ErrorMessage,
        [Location] = XLedgerTransactionUploadFailureLocation.[Description],
        BatchHeaderDescription = XLedgerJournalEntryBatch.[Description]
    from XLedgerTransactionUploadFailure
    inner join XLedgerJournalEntryBatch on
        XLedgerJournalEntryBatch.XLedgerJournalEntryBatchId = XLedgerTransactionUploadFailure.XLedgerJournalEntryBatchFid
    inner join XLedgerTransactionUploadFailureLocation on
        XLedgerTransactionUploadFailureLocation.XLedgerTransactionUploadFailureLocationId = XLedgerTransactionUploadFailure.XLedgerTransactionUploadFailureLocationFid
    where XLedgerTransactionUploadFailure.XLedgerJournalEntryBatchFid = @xledgerJournalEntryBatchId
end
GO
GRANT EXECUTE ON  [dbo].[XLedgerCheckForTransactionUploadErrors] TO [MssExec]
GO
Uses