Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

find unmatched records

Kindly help me figure out how to find unmatched records from 2 tables.  If value of field CHONO in table1 does not exist in table2 then create record in table3.  Thank you

3 Replies
matt_crowther
Luminary Alumni
Luminary Alumni

I'd look to do an Outer join between the 2 tables to create amaster table then perform a Resident load from the Master where the rows aren't complete and thefore must be Un-Matched records (both A not in B and vice versa - by controlling the Where clause you can return only A not in B or B not in A).

Hope that helps,

Matt - Visual Analytics Ltd

Not applicable
Author

way late I know but just did this today:

very easy in SQL:

Table3:

Load *;

SQL

select t1.CHONO

from Table1 t1

left join Table2 t2 on t1.CHONO=t2.CHONO

where t2.CHONO is null;

If you want distinct list add distinct after select.

Anonymous
Not applicable
Author

klangley - Good set-based solution for SQL as it pushes the heavy lifting off to the database server. But this solution will only find unmatched in SQL, not in QlikView.  For example (as was my situation), I needed to find unmatched in two qvd's.I was able to leverage Matthew Crowther's solution.