Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

thnkgreen
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?

Tags (1)
1 Solution

Accepted Solutions
swuehl
Not applicable

Re: Subquery a table

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.

5 Replies
swuehl
Not applicable

Re: Subquery a table

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.

thnkgreen
Not applicable

Re: Subquery a table

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. 

thnkgreen
Not applicable

Re: Subquery a table

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
Not applicable

Re: Subquery a table

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.

thnkgreen
Not applicable

Re: Subquery a table

Thank you so much for your help swuehl