Partition by outer join

From: aditya desai <admad123(at)gmail(dot)com>
To: pgsql-sql <pgsql-sql(at)lists(dot)postgresql(dot)org>
Subject: Partition by outer join
Date: 2021-08-23 15:52:47
Message-ID: CAN0SRDEBQyzV2Ze0jN-rtA+SzpHSA9RP5=7hC1ASYpP-4pD5gQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,
While trying to migrate Oracle to Postgres wera stuck with PARTITION BY
OUTER JOIN. Can someone help rewriting or helping with Postgres
equivalent of below query? Thanks in advance.

Select csa_mast.cconsol,

csa_mast.tics_code,

csa_mast.csa_id,

csa_mast.csa_type,

csa_mast.ccy,

csa_mast.collateral_curve_id,

csa_mast.check_non_std_flags

from dummy

left outer join csa_mast partition by (csa_mast.cconsol)

on ( (did = 1 and (csa_id is null or csa_mast.csa_type = ‘LEG’))

or

(d.id = 2 and csa_mast.csa_type = ‘REG’)

)

Where d.id = 1

Or (d.id = 2 and csa_mast.csa_type = ‘REG’)

Regards,

Aditya.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message aditya desai 2021-08-24 03:58:15 Re: Partition by outer join
Previous Message David G. Johnston 2021-08-19 05:12:30 Re: Backup Functions