split_part() macht, was Sie wollen in einem Schritt:
SELECT split_part(col, ',', 1) AS col1
, split_part(col, ',', 2) AS col2
, split_part(col, ',', 3) AS col3
, split_part(col, ',', 4) AS col4
FROM tbl;
Fügen Sie so viele Zeilen hinzu, wie Sie Elemente in col haben (das mögliche Maximum).
Spalten, die Datenelemente überschreiten, sind leere Zeichenfolgen (''). ).