none
E_CQO_SYSTEM_INTERNAL_ERROR: Index was outside the bounds of the array

    Question

  • I have just started working with U-SQL. My previous experience in SQL Server and C# have helped me to get started, but I am getting an error that I do not understand:

    "E_CQO_SYSTEM_INTERNAL_ERROR: Index was outside the bounds of the array"

    The error occurs in this piece of code:

    @Reconciliation = 
        SELECT   @GLT0_TOTALS.[Company Code] ?? @BKPFBSEG.[Company Code] AS [Company Code]
    		    ,@GLT0_TOTALS.[GL Account] ?? @BKPFBSEG.[GL Account]     AS [GL Account]
    		    ,@GLT0_TOTALS.[Amount] ?? 0                              AS [Amount GLT0]
    		    ,@BKPFBSEG.[Amount] ?? 0                                 AS [Amount BSEG]
    		    ,@GLT0_TOTALS.[Amount] ?? 0 - @BKPFBSEG.[Amount] ?? 0    AS [Difference]
    		    ,@GLT0_TOTALS.[Fiscal Year] ?? @BKPFBSEG.[Fiscal Year]   AS [Fiscal Year]
        FROM @GLT0_TOTALS
        FULL OUTER JOIN @BKPFBSEG
        ON  @GLT0_TOTALS.[Client] == @BKPFBSEG.[Client]
        AND @GLT0_TOTALS.[Company Code] == @BKPFBSEG.[Company Code]
        AND @GLT0_TOTALS.[Fiscal Year] == @BKPFBSEG.[Fiscal Year]
        WHERE (@GLT0_TOTALS.[Amount] ?? 0) - (@BKPFBSEG.[Amount] ?? 0) != 0;

    Both tables that I am trying to join contain the same columns ([Client] string, [Company Code] string, [Fiscal Year] string, [GL Account] string, [Amount] double).

    What I have tried so far:

    • Removing the WHERE clause
    • Changing the SELECT to a SELECT *
    • Changing the JOIN type to INNER JOIN

    All result in the same error. A select from both tables individually work fine.

    It's clear that the join is causing the error, but I do not understand why or how to resolve it. Can anyone point me in the right direction?

    Thanks,

    Wouter

    Monday, April 10, 2017 3:33 PM

All replies

  • thank you for posting this question and reporting this problem.

    the issue here is existence of spaces in your column references. this is a defect that has already been fixed in the product and the lab - this will be released in one of the next ADLA refreshes. until this is fixed, please remove spaces in your column references (including extract statements) and retry it...

    apologies for incontinence and hope this helps.

    igor

    Wednesday, April 12, 2017 4:23 PM
  • Thanks! That did the trick.
    Thursday, April 13, 2017 8:36 AM