Hello,
I have a group of rows with a string field, as in the example:
Row #1: "AJDEKB"
Row #2: "DHEJKS"
Row #3: "JEKRSQ"
...
and I need to get the greatest character of each position in the string.
In the example, the result should be: "JJKRSS"
I achieve that result by taking each cahracter as a substring and using the MAX group function:
SELECT MAX(SUBSTR(COL1, 1, 1)) || MAX(SUBSTR(COL1, 2, 1) || MAX(SUBSTR(COL1, 3, 1) || ...
but as the real string is very long, I get a very very long query as a result.
Does anybody know a better way to do this?
Thanks in advance.