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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
remo0017
Contributor II
Contributor II

Missing record from tables in Qlikview

Dear Friends,

I have two load statements like this.

table1:

LOAD

firstname,

lastname,

empid

from t1.qvd

table2:

LOAD

deptno,

ename,

empid ;

SQL

select

deptno,

ename,

empid

from employee;

Now I need to pull the records that exists in table2 but that doesn't exist in table1 based on empid.

Could you guys help me on this please.

3 Replies
Anil_Babu_Samineni

May be this?

table1:

LOAD firstname, lastname, empid from t1.qvd

Join

table2:

LOAD deptno, ename, empid

WHERE EXISTS(empid) ;

SQL

select

deptno,

ename,

empid

from employee;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
remo0017
Contributor II
Contributor II
Author

Nope's its not working

empid from table1 and table2 are derived by using some function from the field empid from employee table?

so when I use the above statement it doesn't work it says its not able to find the empid in employee table.

Thanks very much

maxgro
MVP
MVP

add at the end of the script

left join (table2)

load

    empid,

    1 as flagexistsintable1          // 1 if exists in table1, null if doesn't

Resident table1;