
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exists Function with 2 parameters
Hi All,
Is it mandatory to have same names for the 2 parameters inside exists function in the below example?
LOAD * INLINE [
ID, NAME
1A, A
2A, B
3A, C
4A, D
5A, E
];
//Load ID , NAM as NAME;
LOAD * INLINE [
ID, NAM
6B, A
7B, B
8B, X
]
where NOT Exists (NAME, NAM)
;
The above query retains the ID value (8B) and somehow removes the NAM value (X) in the resulting table.
But, if i use same names inside the parameter of Exists (see below code)by renaming the field NAM as NAME in the 2nd LOAD, both (8B) and (X) are not seen in the result.
LOAD * INLINE [
ID, NAME
1A, A
2A, B
3A, C
4A, D
5A, E
];
Load ID , NAM as NAME;
LOAD * INLINE [
ID, NAM
6B, A
7B, B
8B, X
]
where NOT Exists (NAME, NAM)
;
Can anyone please tell me if it is a must to have the 2 parameters inside exists function to be the same. Thanks in advance.
Kind Regards,
Sharath Panackal
- Tags:
- qlikview_scripting

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
not exactly sure what your results are but assuming you want a single table without duplicate values
use below script approach
LOAD * INLINE [
ID, NAME
1A, A
2A, B
3A, C
4A, D
5A, E
];
load *
where NOT Exists (NAME)
;
Load ID , NAM as NAME
;
LOAD * INLINE [
ID, NAM
6B, A
7B, B
8B, X
]
;
result
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sharath, did Dilip's post give you what you needed? If so, please be sure to circle back and use the Accept as Solution button on his post to give him credit for the help and to let others know it worked. If you did something different, consider posting that and marking it, and if you are still working on things, leave an update for us.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Sarath, I tried both scripts and both versions keeps the '8B' and 'X' values (in the first case 'X' is loaded in the NAM field, not in NAME field)
It's not a must to have both values with the same name in Exists: https://help.qlik.com/en-US/sense/September2018/Subsystems/Hub/Content/Sense_Hub/Scripting/InterReco...
Also, if both parameters have the same name you can use the one-parameter version (like Dilipranjith is using in his answer), that allows for optimized load when loading from qvd.
