My SQL query (in Oracle 11g) returns a column like this:
31132,11100,44232
25464,89453,15686
21561,68547,51612
I want to order these cells, I mean:
11100,31132,44232
15686,25464,89453
21561,51612,68547
How can I do this?
Thanks in advance!
You can use REGEXP_SUBSTR to pull out the individual numbers from each row, and then use LISTAGG to rejoin them in the desired order -- something like the below: