Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello:
I've this script
Table1:
LOAD KeyField, Field12, Field13, Field14 ..
Table2:
LOAD KeyField, Field22, Field23, Field24 ..
I need to create a new boolean field calculated (NewField) on Table2 thats indicates if KeyField is or not in Table1.
I've thought in a mapping table created from resident Table1 and an applymap in Table2 LOAD instruction
Map:
MAPPING
LOAD KeyField, 'Yes' as NewField
Resident Table1
(In Table2 LOAD) Applymap('Map', KeyField, 'No) as NewField
Is there any easy way, a function or a smart way to do it ?
Thank you
Joaquín
Table1:
LOAD KeyField, Field12, Field13, Field14 ..
Table2:
LOAD KeyField, Field22, Field23, Field24 ..,If(Exists(KeyField),'Present','Not P') As Flag...
Table1:
LOAD KeyField, Field12, Field13, Field14 ..
Table2:
LOAD KeyField, Field22, Field23, Field24 ..,If(Exists(KeyField),'Present','Not P') As Flag...
Table1:
LOAD KeyField, Field12, Field13, Field14 ..
Table2:
LOAD KeyField, Field22, Field23, Field24 ,Yes as Flag
where exists (KeyField)
concatenate
Table3:
LOAD KeyField, Field22, Field23, Field24 ,No as Flag
where not exists (KeyField)
Thank you anbu1984 it works fine.