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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Scripting - add record if key is not present


I have two tables :

Table 1:

Key

Reason

Table 2:

Key

Reason

I want to write a script that would concatenate Table 2 (into Table 1)  ONLY when the key in Table 2 is not present in Table 1.

Thanks in advance for any help.

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Table 1:

Load

Key

Reason

From TableName....

Concatenate

Table 2:

Load

Key

Reason

From TableName

Where Not Exists(Key)

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Table 1:

Load

Key

Reason

From TableName....

Concatenate

Table 2:

Load

Key

Reason

From TableName

Where Not Exists(Key)

its_anandrjs
Champion III
Champion III

Try with Where NOT Exists statement

The below is example load script for understand how it works

Ex:-

Table1:

LOAD * Inline

[

Key,Reason

1,N

2,Y

];

Concatenate

Table2:

LOAD * Inline

[

Key,Reason

3,Y

] Where not Exists(Key);