public inbox for [email protected]  
help / color / mirror / Atom feed
Re: Removing terminal period from varchar string in table column
2+ messages / 2 participants
[nested] [flat]

* Re: Removing terminal period from varchar string in table column
@ 2025-07-15 18:19 Thom Brown <[email protected]>
  2025-07-15 20:15 ` Re: Removing terminal period from varchar string in table column Rich Shepard <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Thom Brown @ 2025-07-15 18:19 UTC (permalink / raw)
  To: Rich Shepard <[email protected]>; +Cc: pgsql-general

On Tue, 15 Jul 2025, 18:59 Rich Shepard, <[email protected]> wrote:

> On Tue, 15 Jul 2025, Thom Brown wrote:
>
> > There are various options, but perhaps just use rtrim.
> > rtrim(company_name, '.')
>
> Thom,
>
> I looked at rtrim() but didn't see where to specify the table name. Would
> it
> be `select * from table companies rtrim(company_name, '.')'?
>

UPDATE companies
SET company_name = rtrim(company_name, '.')
WHERE company_name != rtrim(company_name, '.');

Thom

>


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Removing terminal period from varchar string in table column
  2025-07-15 18:19 Re: Removing terminal period from varchar string in table column Thom Brown <[email protected]>
@ 2025-07-15 20:15 ` Rich Shepard <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Rich Shepard @ 2025-07-15 20:15 UTC (permalink / raw)
  To: pgsql-general

On Tue, 15 Jul 2025, Thom Brown wrote:

> UPDATE companies
> SET company_name = rtrim(company_name, '.')
> WHERE company_name != rtrim(company_name, '.');

Thom,

That makes sense. The web pages I read assumed I knew to use the UPDATE
command. As this was the first time I needed to clean column content I
didn't assume that update was the appropriate mechanism. Now I do.

Thanks,

Rich






^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2025-07-15 20:15 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-07-15 18:19 Re: Removing terminal period from varchar string in table column Thom Brown <[email protected]>
2025-07-15 20:15 ` Rich Shepard <[email protected]>

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