Re: Return select statement with sql case statement

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Ron <ronljohnsonjr(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Return select statement with sql case statement
Date: 2018-07-04 23:16:28
Message-ID: CAKFQuwaWMpto-UNT3mBWz3KCzRBu0gP5e--P6xKfc4Od+b5_ow@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, July 4, 2018, Ron <ronljohnsonjr(at)gmail(dot)com> wrote:
>
> Ah, didn't notice that. Then... dynamic sql constructed by the
> programming language executing the query?
>

That, the UNION idea, or pull the common stuff into the from clause and
write two left joins then coalesce whichever one provided the row. In
short, the OP cannot do what they thought they needed to do but hasn't
really provided any info for others to make alternative suggestions.

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Łukasz Jarych 2018-07-05 05:49:17 Re: Cloning schemas
Previous Message Melvin Davidson 2018-07-04 23:08:46 Re: Cloning schemas