public inbox for [email protected]
help / color / mirror / Atom feedFrom: Rich Shepard <[email protected]>
To: [email protected] <[email protected]>
Subject: Re: Using psql's \prompt command [RESOLVED]
Date: Thu, 30 Jan 2025 15:35:04 -0800 (PST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<CAKFQuwbBrjF6Hx3zOo1p7=+ui=qeoZiK46-=Ov8JC=5GqvPe2A@mail.gmail.com>
<[email protected]>
<[email protected]>
<CAKFQuwYk1xeDbna0_6htbvUMptn=TK0rKN=5doOjNPCaQ3zjEA@mail.gmail.com>
<CAKFQuwYZs0zuUhNO37ToOUVuAyjsJ91U_Fw=2ouBrHcmQ8UHLg@mail.gmail.com>
<[email protected]>
On Thu, 30 Jan 2025, Rich Shepard wrote:
> Thanks again, David. I didn't know that's the section I need.
David/Ron, et al.:
Got it (example on page 2126 of the doc):
-- Display person_nbr, lname, fname, direct_phone, email from people, contact history from contacts.
-- prompt for person_nbr before selecting rows:
\prompt 'Enter person_nbr: ' who
select p.person_nbr, p.lname, p.fname, p.direct_phone, p.email, c.contact_date, c.contact_time, c.contact_type, c.notes
from people as p natural inner join contacts as c
where p.person_nbr = (:'who')
order by c.contact_date, c.contact_time;
This works.
Thank you,
Rich
view thread (9+ messages)
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 using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: Using psql's \prompt command [RESOLVED]
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox