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.

Not applicable

Display Uncommon Data fields between 2 tables.

Hi I want to display uncommon data between 2 tables

EMP:

ID NAME

1     A

2     B

3     C

4     D

5     E

DEPT:

ID DEPT

4     IT

5     BPO

6     PHARMA

i want to display the intersection of data i.e

ID NAME

1     A

2     B

3     C

1 Reply
Not applicable

Re: Display Uncommon Data fields between 2 tables.

Hi ,

Use not exists() function.

 

EMP:
LOAD ID,
     NAME
FROM
C:\Users\298458\Desktop\Test\Data\Book1.xlsx
(ooxml, embedded labels, table is Sheet1);
DEPT:
NoConcatenate
LOAD ID,
     DEPT
FROM
C:\Users\298458\Desktop\Test\Data\Book1.xlsx
(ooxml, embedded labels, table is Sheet2);


c:
NoConcatenate
load ID as testid,
ID as EmpID,
NAME
Resident EMP;
join
load ID as testid,
ID as DEPTID,
DEPT
Resident DEPT;

drop Tables EMP,DEPT;

Final:
NoConcatenate
load * Resident c where not Exists(testid,DEPTID);
drop Tables c;

Thanks,

Sampath