pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedcreate query with date values
3+ messages / 3 participants
[nested] [flat]
* create query with date values
@ 2021-12-31 13:12 ourdiaspora <ourdiaspora@protonmail.com>
2021-12-31 15:34 ` Re: create query with date values Ron <ronljohnsonjr@gmail.com>
2021-12-31 16:24 ` Re: create query with date values David G. Johnston <david.g.johnston@gmail.com>
0 siblings, 2 replies; 3+ messages in thread
From: ourdiaspora @ 2021-12-31 13:12 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: create query with date values
2021-12-31 13:12 create query with date values ourdiaspora <ourdiaspora@protonmail.com>
@ 2021-12-31 15:34 ` Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: Ron @ 2021-12-31 15:34 UTC (permalink / raw)
To: pgsql-general@lists.postgresql.org
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.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: create query with date values
2021-12-31 13:12 create query with date values ourdiaspora <ourdiaspora@protonmail.com>
@ 2021-12-31 16:24 ` David G. Johnston <david.g.johnston@gmail.com>
1 sibling, 0 replies; 3+ messages in thread
From: David G. Johnston @ 2021-12-31 16:24 UTC (permalink / raw)
To: ourdiaspora <ourdiaspora@protonmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
On Friday, December 31, 2021, ourdiaspora <ourdiaspora@protonmail.com>
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.
>
You have normal queries, functions, and procedures. I suppose a “prepared
query” might also fit the bill. Read up on those and, along with whatever
application-level abstractions you choose to create, have tools for
building queries.
David J.
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2021-12-31 16:24 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-12-31 13:12 create query with date values ourdiaspora <ourdiaspora@protonmail.com>
2021-12-31 15:34 ` Ron <ronljohnsonjr@gmail.com>
2021-12-31 16:24 ` David G. Johnston <david.g.johnston@gmail.com>
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