Please check if this thread helps or we would recommend to raise this issue with Postgresql community.
Regards
Navtej S
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a column with comma-separated values and I want to split it into fixed-size columns. I have used the split_part function to do so but the values in columns should appear from the right side. Example:
Table with a single column
a1, b1, c1
a2, b2, c2, d2, e2, f2
a3, b3, c3, d3, e3, f3, g3, h3, i3, j3
a4
a5, b5, c5
'
'
'
Output i got using split_part():
c1 c2 c3 c4 c5
---------------
a1 b1 c1
a2 b2 c2 d2 e2
f2
a3 b3 c3 d3 e3
f3 g3 h3 i3 j3
a4
a5 b5 c5
'
'
'
Expected output:
c1 c2 c3 c4 c5
------------------
c1 b1 a1
'
'
'
so on...