Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have tables as shown (First row is table name)
Limited |
ID |
Full Table |
ID |
Alternate Table |
ID2 |
I need to check if ID2 has any matching values in Full Table 'ID' and if it does, then check if ID2 matches with any Limited table 'ID'
In simple case,
if(Alternate Table ID2 = Full Table ID, then check
if(Alternate Table ID2= Limited 'ID', then 'Yes','No') in the script.
How do I achieve this in the script?
If you are adding this Yes/No flag to the [Alternate Table].
mapLimitedID:
mapping
load ID,
'1' as IDFlag
Resident [Limited];
mapFullTableID:
mapping
load ID,
'1' as IDFlag
Resident [Full Table];
[Alternate Table]:
load ID2
If(ApplyMap('mapFullTableID',ID2,'0') = '1',
If(ApplyMap('mapLimitedID',ID2,'0') - '1','YES','No'),'No')
From AlternateTableSource;
If you are adding this Yes/No flag to the [Alternate Table].
mapLimitedID:
mapping
load ID,
'1' as IDFlag
Resident [Limited];
mapFullTableID:
mapping
load ID,
'1' as IDFlag
Resident [Full Table];
[Alternate Table]:
load ID2
If(ApplyMap('mapFullTableID',ID2,'0') = '1',
If(ApplyMap('mapLimitedID',ID2,'0') - '1','YES','No'),'No')
From AlternateTableSource;
Thank You