Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Doubt in concatenate

Hi, Sorry for the basic question but this is not working:

FactTable:

Load A,B,C;

SELECT ... FROM Table1;

CONCATENATE (FactTable)

Load A,B;

SELECT ... FROM Table2;

LEFT JOIN

LOAD A,C;

SELECT ... FROM SubTable;

The LEFT join is workinf fine, if I run it alone Table2 and Subtable, column C is fine.

So I was expecting Field C from Subtable to concatenate on FactTable,it returns NULL


Any tip on what am I doing wrong?

Thanks

2 Replies
swuehl
Champion III
Champion III

Try doing the JOIN of your tables Table2 and SubTable in your SQL SELECT part (single LOAD statement so to say).

Anonymous
Not applicable
Author

I think I know why it doesn't work...

FactTable:

Load A,B,C;

SELECT ... FROM Table1;

CONCATENATE (FactTable)

Load A,B;

SELECT ... FROM Table2;

--> result is a table with Fields A,B,C, even if some C - Fields are null().

LEFT JOIN

LOAD A,C;

SELECT ... FROM SubTable;

will only work, if A and C match --> Synthetic Key!!!

--> solution could be the following:

FactTable:

Load A,B;

SELECT ... FROM Table2;

LEFT JOIN

LOAD A,C;

SELECT ... FROM SubTable;

CONCATENATE (FactTable)

Load A,B,C;

SELECT ... FROM Table1;

--> first join (only A as Key), then concatenate the rest.

You could even remove

CONCATENATE (FactTable)

because if all names are the same, QlikView will do an implicit concatenate.