Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
andrespa
Specialist
Specialist

Where...On

Hi, I'm not sure if this is possible in any way on Qlikview, but I want to use the typical "on" in the where clause. I'll show you with an example of what I want.

Have two tables (a,b), and want to get the values that are just on table b:

TABLE_A:

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    4, D

    5, E

];

TABLE_B:

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    6, X

    7, Y

];

My desire output would be:

TABLE_FINAL

KEY, VALUE

6     ,X

7     ,Y

In SQL this would be as easy as say:

SELECT * FROM TABLE_A A

RIGHT JOIN TABLE_B B

ON A.KEY=B.KEY

WHERE A.KEY IS NULL

But in Qlikview I'm only able to put the right join but without the "on" so can't figure it out yet.

Any ideas would be highly appreciate it.

Cheers,

Andrés

1 Solution

Accepted Solutions
Gysbert_Wassenaar

TABLE_A:

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    4, D

    5, E

];

TABLE_B:

NOCONCATENATE

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    6, X

    7, Y

]

WHERE NOT Exists(KEY);

DROP TABLE TABLE_A;


talk is cheap, supply exceeds demand

View solution in original post

5 Replies
Gysbert_Wassenaar

TABLE_A:

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    4, D

    5, E

];

TABLE_B:

NOCONCATENATE

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    6, X

    7, Y

]

WHERE NOT Exists(KEY);

DROP TABLE TABLE_A;


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

JOINs in QV are using keys that are implicitely derived from common field names, there is no possibility to specify the key fields explicitely.

sunny_talwar

May be using Where not exist

swuehl
MVP
MVP

TABLE_A:

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    4, D

    5, E

];

TABLE_B:

NOCONCATENATE

LOAD * INLINE [

    KEY, VALUE

    1, A

    2, B

    3, C

    6, X

    7, Y

]

WHERE NOT Exist(KEY);

DROP TABLE TABLE_A;

andrespa
Specialist
Specialist
Author

Thanks Gysbert!! It worked! So simple but couldn't see it!

Cheers!