Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

andreyfcdk91
New Contributor III

Identify type of joining

Colleagues, good day!

Simple question:

Script loads first table:

 

IdField1
1A
2A
3A
4A
5A
6A

Then i must load second table but only data for those Id which are not contain in first table:

Second:

 

IdField2
1B
2B
3B
4B
8B
9B

In result i must get only:

 

IdField2
8B
9B

Thanks.

14 Replies

Re: Identify type of joining

Try on your second load :

     where not exists (Id)

MVP
MVP

Re: Identify type of joining

May be like this:

A:

LOAD Id,

           Field1

FROM....

B:

LOAD Id,

           Field2

FROM ...

Where not Exists(Id);

DROP Table A;

andreyfcdk91
New Contributor III

Re: Identify type of joining

Thanks!

It works.

But how QV Know, what previous table must be checked for already exist values? (Id in this case)

johncaqc
Valued Contributor

Re: Identify type of joining

Maybe like this?

temp1:

Load * Inline [

  Id, Field1

  1,A

  2,A

  3,A

  4,A

  5,A

  6,A

  ];

TEMP2:

NoConcatenate

Load *

Where Not Exists (Id);

Load * Inline [

  Id, Field1

  1,B

  2,B

  3,B

  4,B

  8,B

  9,B

  ];

Drop Table temp1;

Re: Identify type of joining

QlikView checks the data model for the field Id and looks up values already loaded into the field.  This is done at the field level, not the table level.

MVP
MVP

Re: Identify type of joining

This is how Exist function works where it checks against all possible value within a field previously loaded in the script.

Re: Identify type of joining

Qlik checked for this the values within the symbol-tables, see here what is meant: Symbol Tables and Bit-Stuffed Pointers.

- Marcus

andreyfcdk91
New Contributor III

Re: Identify type of joining

Thanks))

And is is possible to check for some fields combinations?

For ex:

First table:

 

IdF1
1A
2A
3A
4A
5B
6

B

Second:

 

IdF1
13
2ed
3fd
4dfd
5fdf
6B
7u

for where not Exists(Id&F1) i must get only:

 

IdF1
5fdf
7u

but it returns empty result

andreyfcdk91
New Contributor III

Re: Identify type of joining

Thanks!

Community Browser