In this field there is identified the country and another Identifier (Example: REFR,FRRE = France). So I would like to create a Field that contains the country and this is linked to the COD field. If we follow the previous example, when we select FR the field that should be selected from COD are REFR and FRRE.
Any idea of how to do this without doing manually?
How can I turn one field of data into multiple fields?
Tab1: LOAD COD, <other> <from whatever source>;
I just wonder, how any algorithm can decide, whether to take the first two, or the last two letters. So just for the basics, I assume only the right 2 letters are relevant:
Tab2: LOAD Distinct right(COD,2) as Country, COD resident Tab1;
To solve the left/right issue, I would say you need some kind of flag to determine, whether to take left or right. Let's hope there is any other field within your data which gives you the information, then it would look similar to