Hello,
I'm fairly new to PostgreSQL and have a situation where I need to flatten a text column to two separate columns.
Below is the query I'm using:
[CODE]SELECT s.CoolerShelf,
s.ShelfPosition ,
FROM planogram
CROSS JOIN LATERAL UNNEST(string_t o_array(shelves , ','))
WITH ORDINALITY s(CoolerShelf,S helfPosition)
code
code;
Below...
User Profile
Collapse
No activity results to display
Show More