Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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;
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
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;