Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
sanketkhunte
Creator II
Creator II

can we handle non-equi join in Qlikview ?

Hi team,

Can we handle following case in Qlikview data model ?

SELECT COUNT(T1.FIELD1)

FROM TABLE T1,TABLE T2

WHERE

T1.KEY = T2.KEY AND

T1.KEY2 <> T2.KEY2

Your reply will definitely appreciate to me.

Thank you.

Sanket

6 Replies
bbi_mba_76
Partner - Specialist
Partner - Specialist

Hi,

I think you have to create more steps, at least two: in the first you have only the first join (KEY), then a second step to apply the second join (KEY2).

sanketkhunte
Creator II
Creator II
Author

But how ?? Can you explain through script .. thats may be more helpful

Anonymous
Not applicable

Is this not a way,

Table1:

Load Key1 as #Key1,

Key2,

otherfields

from table;

Table 2:

Load Key as #Key1,

Key2 as #Key2,

otherfields

from table 2

where not exists(Key2)

;

when loaded,

this will map with #Key1 only. and

not exists will only load data of those values where Key2 is not avalilabe in table 1.


tresesco
MVP
MVP

May be like :

JoinedTable:

Load

          Field1,

          KEY

From T1;

Left Join

Load

          KEY,

          KEY2

From T2;

Final:

Load

         Count(Field1) as Count

Resident JoinedTable Where KEY<>KEY2;

Drop Table JoinedTable;

sanketkhunte
Creator II
Creator II
Author

I think it is helpful.

Not applicable

You can do theta joins, but only in SQL script as far as i know. Solutions above are logical equivalents of "Not in", which can be regarded as type of a equi join.

If you want to do joins like A.No > B.No and A.No => C.No you better look how to move this to SQL script or other pluggable languages.