Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Table not found when loading..

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;

1 Solution

Accepted Solutions
jaimeaguilar
Partner
Partner

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

View solution in original post

1 Reply
jaimeaguilar
Partner
Partner

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

View solution in original post