
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exists not working properly
Hi Folks,
I got some wrong data when I am using exists function in the script.
My script is: (This is sample script)
ABC:
LOAD * INLINE [
A, C
1, asd
1, tyu
2, dfgf
];
Concatenate
LOAD * INLINE [
A, C
1, sdf
1, fg
1, ffg
1, fr
2, vg
2, tte
2, tgfg
2, rew
2, fgr
3, rre
3, abcd
4, gtr
4, jkl
5, dfryujhb
5, dfgh
] where not Exists (A);
I reload the data, I got only unique rows for A=3,4,5,
Below is my Table Box.
A | C |
1 | asd |
1 | tyu |
2 | dfgf |
3 | rre |
4 | gtr |
5 | dfryujhb |
Please find the atched application.
Why I am not getting full values in the second table.
Please help me this, I script is wrong.
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your first table loads values 1 and 2 for field A.
Your where not exists clause then skips records from second table with values 1 and 2 in field A. Then it loads first record with value 3 in field A. Then looks at second record with value 3, but now field A already holds this value.
So QV will always use the most current content of the field, it is updated while loading.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try something like:
ABC:
LOAD *, A as AA INLINE [
A, C
1, asd
1, tyu
2, dfgf
];
Concatenate
LOAD * INLINE [
A, C
1, sdf
1, fg
1, ffg
1, fr
2, vg
2, tte
2, tgfg
2, rew
2, fgr
3, rre
3, abcd
4, gtr
4, jkl
5, dfryujhb
5, dfgh
] where not Exists (AA,A);
drop field AA;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for promt reply.
Your script work correctly. Why we need one more field AA. Is there any special Reason?
Thanks & Regards,
Siri


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your first table loads values 1 and 2 for field A.
Your where not exists clause then skips records from second table with values 1 and 2 in field A. Then it loads first record with value 3 in field A. Then looks at second record with value 3, but now field A already holds this value.
So QV will always use the most current content of the field, it is updated while loading.
