1 Reply Latest reply: Aug 13, 2014 2:07 PM by Jaime Aguilar RSS

    Table not found when loading..

    Fadi El Khaja

      I'm trying to load the following and getting "Table not found" error when loading concatenating the second table.. it seems like the second load is completely ignoring the fact that I named the table HCMEMBERSHIP2 and trying to load into HCMEMBERSHIP.. Not sure what i'm missing here.. code is:

       

      HCMEMBERSHIP:

      Load

        Peek('System Id',0 ,'HCMEMBERSHIPTEMP') as [System Id],

        Peek('Enrolled Member Count', 0 ,'HCMEMBERSHIPTEMP') as [Enrolled Member Count],

        Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM') AS [Year Month],

        left(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 4) as Year,

        right(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 2) as Month

        AUTOGENERATE 1 WHILE addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() + 1) <  Date#($(v_UpdatedDate), 'YYYYMM');   

       

       

      Concatenate (MEMBERSHIP)

      Load * Resident HCMEMBERSHIP;

       

       

      HCMEMBERSHIP2:

      Load

        Peek('System Id',1 ,'HCMEMBERSHIPTEMP') as [System Id],

        Peek('Enrolled Member Count', 1 ,'HCMEMBERSHIPTEMP') as [Enrolled Member Count],

        Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM') AS [Year Month],

        left(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 4) as Year,

        right(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 2) as Month

        AUTOGENERATE 1 WHILE addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() + 1) < Date#($(v_UpdatedDate), 'YYYYMM'); 

       

      Concatenate (MEMBERSHIP)

      Load * Resident HCMEMBERSHIP2;

        • Re: Table not found when loading..
          Jaime Aguilar

          Hi,

          this is happening because HCMEMBERSHIP and HCMEMBERSHIP2 have exactly the same fields, this causes automatic concatenation. So when you try to do a resident from HCMEMBERSHIP2 you get an error because this table has been automatically concatenated to HCMEMBERSHIP.

           

           

          try this:

           

          HCMEMBERSHIP:

          Load

            Peek('System Id',0 ,'HCMEMBERSHIPTEMP') as [System Id],

            Peek('Enrolled Member Count', 0 ,'HCMEMBERSHIPTEMP') as [Enrolled Member Count],

            Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM') AS [Year Month],

            left(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 4) as Year,

            right(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 2) as Month

            AUTOGENERATE 1 WHILE addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() + 1) <  Date#($(v_UpdatedDate), 'YYYYMM');  

           

           

          Concatenate (MEMBERSHIP)

          Load * Resident HCMEMBERSHIP;

           

          Noconcatenate

          HCMEMBERSHIP2:

          Load

            Peek('System Id',1 ,'HCMEMBERSHIPTEMP') as [System Id],

            Peek('Enrolled Member Count', 1 ,'HCMEMBERSHIPTEMP') as [Enrolled Member Count],

            Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM') AS [Year Month],

            left(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 4) as Year,

            right(Date(addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() - 1), 'YYYYMM'), 2) as Month

            AUTOGENERATE 1 WHILE addmonths(Date#($(vDateMin),'YYYYMM'), RowNo() + 1) < Date#($(v_UpdatedDate), 'YYYYMM');

           

          Concatenate (MEMBERSHIP)

          Load * Resident HCMEMBERSHIP2;


          regards