Re: Oracle ==> Postgres View

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Sam Stearns <sam(dot)stearns(at)dat(dot)com>
Cc: pgsql-sql(at)lists(dot)postgresql(dot)org
Subject: Re: Oracle ==> Postgres View
Date: 2024-10-15 21:46:01
Message-ID: CAApHDvo_oS=-roQf29NJ0UQKkYEhSPb3oxqFEz5t-93n0ttb6Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Wed, 16 Oct 2024 at 10:31, Sam Stearns <sam(dot)stearns(at)dat(dot)com> wrote:
> coalesce(CASE WHEN impact_category='BULK_RATE_REQUEST', 1, -- To handle Portal's category for the old RIP
> 'CONTRACT_BULK_RATE', 1,
> 'SPOT_BULK_RATE', 2,
> 'CONTRACT_HISTORY', 3,
> 'SPOT_HISTORY', 4,
> 'RATE_SUBMISSION', 5,
> 'SPOT_BACKHAUL' THEN 6 END , 0),
>
> Would anyone be able to advise how to correct this for Postgres, please?

Have a look at the syntax of your case statement and check it against [1].

David

[1] https://www.postgresql.org/docs/current/functions-conditional.html

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message William Alves Da Silva 2024-10-15 21:49:19 Re: Oracle ==> Postgres View
Previous Message Sam Stearns 2024-10-15 21:30:55 Oracle ==> Postgres View