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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Non Equi Join in Qlikview

This is something I have searched a lot in Qlikview. Haven't found any solution for this.

Say, I have 2 Tables with the following Data

A:

KeyValue
10150
11100

B:

KeyValue
10150
1180

In SQL, If I do an Inner Join with On A.Key = B.Key and A.Value <> B.Value, I get

KeyValue
11100
1180

How can I achieve this in Qlikview?

12 Replies
effinty2112
Master
Master

Hi Koushik,

                    I've added two extra records to the inline tables to test. Some of the others solutions posted fail with these extra records. The third records in the inline tables should be included in the result, the fourth should not.

A:

LOAD * INLINE [

    Key,  Value

    10, 150

    11, 100

    36, 79

    9, 45

];

NoConcatenate

B:

LOAD * INLINE [

    Key,  Value

    10, 150

    11, 80

     36, 78

    9, 45

   

] Where Exists(Key);

Inner Join(A)

LOAD Distinct

Key Resident B;

NoConcatenate

C:

LOAD * Resident A;

LOAD * Resident B;

DROP tables A,B;

NoConcatenate

Final:

LOAD Key, Value Where ValCount = 1;

LOAD

Key , Value , Count(Value) as ValCount

Resident C Group by Key, Value;

Drop Table C;

Returns

Key Value
1180
11100
3678
3679

Cheers

Andrew

Anonymous
Not applicable
Author

Thanks loveisfail‌.

Anonymous
Not applicable
Author

Thanks for taking your time to answer this question. I figured it out myself later. Forgot to close this thread.