PostgreSQL ERROR: set-returning functions are not allowed in CASE

0

I have tried to implement this formula:

CASE WHEN T."Net Changes" <> '0.00' THEN unnest(array['Net Changes',"Ending Release Reason Type"]) ELSE T."Ending Release Reason Type" END "Ending Reason Type Final" from T

I get the following error:

  

ERROR: set-returning functions are not allowed in CASE       LINE 2: CASE WHEN T. "Net Changes" < > '0.00' THEN unnest (array ['Net C ...                                                    ^       HINT: You might be able to move the set-returning function into a LATERAL FROM item.

    
asked by Daniel Orjuela 23.08.2018 в 18:35
source

0 answers