I have a problem, im my code i need to convert several columns into a table
I have 3 colums
date | stage | amount |
2024-01-01;2023-10-22 | Payed;Unpayed | 400;1800 |
I need to convert it into
date | stage | amount |
2024-01-01 | Payed | 400 |
2023-10-22 | Unpayed | 1800 |
I tried to use string_to_array and unnest() like:
SELECT UNNEST(string_to_array(date), string_to_array(stage), string_to_array(amount)) FROM table
But i get an error message:
SQL Error [42883]: ERROR: function unnest(text[], text[], text[]) does not exist