
Partner - Creator
2023-05-19
04:50 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
check if value exists in a specific filed of another table
Hi All,
I have two tabels, one with people anag. and one with Devices anag. They are linked with the field ID_KEY
I would like to have a field to see if a person does have or not a Device.
First I load The Devices. Then I load the People Anag: at this point I would like to do something like
IF(Devices.ID_KEY Exists in People:ID_KEY, 'YES' , 'NO' ) as Flag
What should I use?
Since the number of users and devices is huge, I cannot use the solution proposed Here.
Thank you very much
1,009 Views
1 Solution
Accepted Solutions

MVP
2023-05-19
05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Pico try below
Device_anag:
LOAD ID_Key_Device
....
FROM DeviceAnagTable;
People_Anag:
LOAD ID_Key_People
...,
if(Exists(ID_Key_Device,ID_Key_People),'Y','N') as Flag
FROM PeopleAnagTable;
2 Replies

MVP
2023-05-19
05:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Pico try below
Device_anag:
LOAD ID_Key_Device
....
FROM DeviceAnagTable;
People_Anag:
LOAD ID_Key_People
...,
if(Exists(ID_Key_Device,ID_Key_People),'Y','N') as Flag
FROM PeopleAnagTable;

Partner - Creator
2023-05-25
01:50 PM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Very nice, thank you!
938 Views
