public inbox for [email protected]
help / color / mirror / Atom feedRe: 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 17:43 Jeff Ross <[email protected]>
2025-07-15 18:02 ` Re: Removing terminal period from varchar string in table column Rich Shepard <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Ross @ 2025-07-15 17:43 UTC (permalink / raw)
To: [email protected]; [email protected]
On 7/15/25 11:30, Rich Shepard wrote:
> I want to remove the terminal period '.' from the varchar strings in the
> 'company_name' column in all rows with that period in the companies
> table.
>
> I've looked at trim(), translate(), "substr(company_name 1,
> length(compan_name) - 1)", and a couple of other functions and am
> unsure how
> best to do this without corrupting the database table.
>
> Advice needed.
>
> TIA,
>
> Rich
>
>
>
How about
test:
select company_name, replace(company_name,'.','') from companies;
update:
update companies set company_name = replace(company_name,'.','')
where company_name like '%.';
?
Jeff
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Removing terminal period from varchar string in table column
2025-07-15 17:43 Re: Removing terminal period from varchar string in table column Jeff Ross <[email protected]>
@ 2025-07-15 18:02 ` Rich Shepard <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Rich Shepard @ 2025-07-15 18:02 UTC (permalink / raw)
To: [email protected]
On Tue, 15 Jul 2025, Jeff Ross wrote:
> How about
>
> test:
> select company_name, replace(company_name,'.','') from companies;
>
> update:
> update companies set company_name = replace(company_name,'.','') where
> company_name like '%.';
Jeff,
These contain the table and column names I didn't see in web page examples.
Using update looks better to me.
Many thanks,
Rich
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2025-07-15 18:02 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 17:43 Re: Removing terminal period from varchar string in table column Jeff Ross <[email protected]>
2025-07-15 18:02 ` 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