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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Subquery a table

I am really struggling to find an answer to this question.  I have created a concatenated table by pulling data from two different ODBC connections.  Now I want to select distinct from this newly created table.  I cannot get this to work and can't believe how hard it has been to do something so simple.  Please somone out there let me know, what am I doing wrong?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Have you tried a Distinct Load?

DistinctTable:

NOCONCATENATE LOAD DISTINCT * RESIDENT YourCreatedTable;

drop YourCreatedTable;

Or using WHERE NOT EXISTS(..) in your original LOADs?

edit: It might be helpful if you could post your current code.

View solution in original post

5 Replies
swuehl
MVP
MVP

Have you tried a Distinct Load?

DistinctTable:

NOCONCATENATE LOAD DISTINCT * RESIDENT YourCreatedTable;

drop YourCreatedTable;

Or using WHERE NOT EXISTS(..) in your original LOADs?

edit: It might be helpful if you could post your current code.

Anonymous
Not applicable
Author

Thank you so much for the quick reply swuehl.  I did not realize that you have to type NOCONCATENATE before moving on to the next subquery. 

Anonymous
Not applicable
Author

Thank you so much for the quick reply swuehl.  I did not realize that you have to type NOCONCATENATE before moving on to the next subquery. 

swuehl
MVP
MVP

QV will auto-concatenate tables when these tables have the exact same fields.

So whenever you use something like

LOAD * RESIDENT Table;

this will just concatenate to the resident table. No new table is created.

NOCONCATENATE Load prefix will prevent QV from auto-concatenation.

Anonymous
Not applicable
Author

Thank you so much for your help swuehl