Lookup logic
Posted: Thu Jul 08, 2010 1:53 pm
Hello All,
I have a requirement where-in I have to lookup for each word in a field against a table and fetch the value from the table if a match is found else pass the source value as is. I have searched in the forum but could not get a direction.
I have started with, splitting the Field1 in i/p into multiple columns and then copy Filed1 in reference table into multiple columns for lookup but did not seem to work. May be the hard way of doing it is seperate lookups for each word found!!! I am not sure.
Can anyone shed some light on this or direct me to a post where this is discussed before.
Thanks
I have a requirement where-in I have to lookup for each word in a field against a table and fetch the value from the table if a match is found else pass the source value as is. I have searched in the forum but could not get a direction.
Code: Select all
Eg: Sample Input
Field1 ==> one of the col in the file
"ABC is Techie giant"
Reference Table:
Field1 Field2
ABC DEF
Techie GHI
giant KLM
Expected output:
"DEF is GHI KLM"
Can anyone shed some light on this or direct me to a post where this is discussed before.
Thanks