I have created Table 1 for vehicles, and it has color values (Red
, Blue
, Yellow
). I have to update Table 2's Colors
field by getting each row's max two values field names of Table 1 and concatenate them.
By using a nested if-else, I could get the first max value, but could not get the second max values of each row.
Table 2 field Color
has the expected update result:
TABLE 1
Vehicle Red Blue Yellow
Honda 10 20 25
Yamaha 12 10 22
Suzuki 25 30 40
TABLE 2
Vehicle Color
Honda Blue/Yellow
Yamaha Red/Yellow
Suzuki Blue/Yellow