
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Doubt using Exists() function
Dear experts,
I've started using qvd files as a source of data in script and I have a question.
So in the first part of the function you refer to a field that has been already loaded in the script. But, what if that field appears with the same name in different tables? which one does the function use? the last one?Do I have to specify which table am I referring to?
What I've been doing is to duplicate the field and rename it to make sure I am using the correct one.
Thanks in advance!
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exists() refers to the distinct values of the field regardless in which tables the field occur.
Therefore the order in which the data are loaded is important. Beside the already mentioned method of dropping unwanted tables/fields and loading them if necessary later from a qvd again you may also create some additionally fields, like:
...
KEY as KeyForExists
...
to refer only to a certain subset of KEY values. Another approach could be to rename your fields back and forth on the outside from a load.
Beyond that very powerful exists-stuff it's always helpful to control the order of loadings explicitly.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
you can use Drop Table function to separate those tables,
Regards,
KSrinivasan


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Exists() refers to the distinct values of the field regardless in which tables the field occur.
Therefore the order in which the data are loaded is important. Beside the already mentioned method of dropping unwanted tables/fields and loading them if necessary later from a qvd again you may also create some additionally fields, like:
...
KEY as KeyForExists
...
to refer only to a certain subset of KEY values. Another approach could be to rename your fields back and forth on the outside from a load.
Beyond that very powerful exists-stuff it's always helpful to control the order of loadings explicitly.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot Marcus and KSrinivasan. I think the best option in my case will be to duplicate those fields and rename them. I need the tables so dropping them doesn't seem to be the best option for me.
Thanks once again!
