Re: Fwd: TSQL To Postgres - Unpivot/Union All - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Fwd: TSQL To Postgres - Unpivot/Union All
Date
Msg-id bd9eab6e-7794-9b38-3958-a08d83d15709@gmx.net
Whole thread Raw
In response to Fwd: TSQL To Postgres - Unpivot/Union All  (Anthony Apollis <anthony.apollis@gmail.com>)
List pgsql-general
Anthony Apollis schrieb am 20.07.2023 um 14:17:
> Does not give me outputs for columns: Metric and Pricing Channel:
> image.png
>
> What am i doing wrong? Please assist?

UNPIVOT can be done using a LATERAL sub-query with a VALUES clause:

https://blog.sql-workbench.eu/post/unpivot-with-postgres/




pgsql-general by date:

Previous
From: Geoff Winkless
Date:
Subject: Re: TSQL To Postgres - Unpivot/Union All
Next
From: Adrian Klaver
Date:
Subject: Re: My 1st JDBC and PostgreSQL