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

exists

I have two different code column

Code 1 and code 2 , both codes coming from two different tables. Code2 has more data than code1. How to find what are the codes extra in code2 that is not available in Code1

4 Replies
tresesco
MVP
MVP

May be like:

Tab1:

Load * Inline [

Code1

1

2

3

];

Tab2:

Load * Inline [

Code2

1

2

3

11

111

];

Load

      Code2 as OnlyInTab2

Resident Tab2 where not Exists(Code1,Code2);

sdmech81
Specialist
Specialist

Hi ,

Plss find the attached QVW file.

Which works in your case.but do use flags if data model is huge.Hope this helps

Thanks

sdmech81
Specialist
Specialist

If PE limit crossed,below is the script copy paste and run:

sac:

load * Inline [

Code1,sirname
1,sac
2,dag

]
;


sac2:

load * Inline [

Code2,name
1,sac
2,dag
3,mac

]
where not Exists (Code1,Code2);

Chanty4u
MVP
MVP

From Help File:

Employees:

LOAD * inline [

Employee|ID|Salary

Bill|001|20000

John|002|30000

Steve|003|35000

] (delimiter is '|');

Citizens:

Load * inline [

Name|Address

Bill|New York

Mary|London

Steve|Chicago

Lucy|Paris

John|Miami

] (delimiter is '|');

EmployeeAddresses:

Load Name as Employee, Address Resident Citizens where not  Exists (Employee, Name);

Drop Tables Employees, Citizens;

OutPut:

Employee

      Address
Mary       London
Lucy        Paris