Need some help splitting column data (string) in Postgres into multiple dummy columns such as:
---------column-------
data1;data2;data3 -
data1;data3 -
data1 -
into
- Col1 ---- Col2 ---- Col3
1 | 1 | 1
1 | 0 | 1
1 | 0 | 0
I know the maximum number of columns so I can preset the dummy columns. Do I need to do some sort of for loop?
JP