Subject: Re: Removing terminal period from varchar string in table column

From: Thom Brown <[email-masked]>
Date: Tue, 15 Jul 2025 19:19:18 +0100

On Tue, 15 Jul 2025, 18:59 Rich Shepard, <[email-masked]> 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

---

From: Rich Shepard <[email-masked]>
Date: Tue, 15 Jul 2025 13:15:11 -0700 (PDT)

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