Hi All,
Im sure theres a smart piece of load script out there to achieve the following better than i am currently.
What i want to do is effectively Find and Replace values in a field, with new values, if the existing values can be found in a particular field of a different table. Example below.
What i have as data currently is shown below;
FIELD A | FIELD B |
---|
AAA | Customer A |
BBB | Customer B |
CCC | Customer C |
DDD | Customer D |
CCC | Customer C |
DDD | Customer D |
What i want to do is replace all of the values in 'FIELD A' that are currently CCC with YYY, and also all those that are DDD with ZZZ.
So the end result table is as follows;
FIELD A | FIELD B |
---|
AAA | Customer A |
BBB | Customer B |
YYY | Customer C |
ZZZ | Customer D |
YYY | Customer C |
ZZZ | Customer D |
I would, ideally, like to manage which field values to update, and what to update them with, using another table (excel/cvs etc.). So that table might look like the following;
FIELD A (old) | FIELD A (new) |
---|
CCC | YYY |
DDD | ZZZ |
Ovicously i can do this with an IF() statement in the load script but there are a few values that need replacing so i'd like to manage them outside the load script itself in a seperate table file (excel or csv etc).
Does anyone have a simple solution to this?
Thanks in advance.