pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: create query with date values
Date: Fri, 31 Dec 2021 09:34:36 -0600
Message-ID: <d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com> (raw)
In-Reply-To: <VJqVwcOiPKTld1Rcfwlfzc1mJXrOgaJVmMy9aBonlBfRXWmeE_54agOTN7HQmoyzTU28YEx7X2oLXsfAOoJWxRWWCVCC5qkPo5RX4v8byFA=@protonmail.com>
References: <VJqVwcOiPKTld1Rcfwlfzc1mJXrOgaJVmMy9aBonlBfRXWmeE_54agOTN7HQmoyzTU28YEx7X2oLXsfAOoJWxRWWCVCC5qkPo5RX4v8byFA=@protonmail.com>

On 12/31/21 7:12 AM, ourdiaspora wrote:
> Recipients,
>
> How to create a query such that when a date value is entered, the date may be associated with the result of another query.
>
> The scenario is that a date value is entered (the plan is these dates should be a separate table), then a query result is joined with the date value.
>
> Please advise the correct terminology for appropriate review of the manual.

Maybe I misunderstand you, but it sounds like you are referring to an /inner 
join/ (which is the standard way of joining):

SELECT .....
FROM SEPARATE_TABLE
    , MAIN_TABLE
WHERE SEPARATE_TABLE.SOME_DATE = MAIN_TABLE.OTHER_DATE
;

If this isn't what you mean, please clarify.

-- 
Angular momentum makes the world go 'round.

view thread (3+ messages)  latest in thread

Message-ID: <d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com>
Permalink:  ../d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com/
Also on:    postgresql.org/message-id/d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: create query with date values
  In-Reply-To: <d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com>
  References: <VJqVwcOiPKTld1Rcfwlfzc1mJXrOgaJVmMy9aBonlBfRXWmeE_54agOTN7HQmoyzTU28YEx7X2oLXsfAOoJWxRWWCVCC5qkPo5RX4v8byFA=@protonmail.com> <d03a143e-db82-f6b8-6ed6-ee1719ee453f@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox