using a correlated subquery in update - Mailing list pgsql-novice

From Sean Davis
Subject using a correlated subquery in update
Date
Msg-id D1792BB0-452D-11D9-9DF2-000D933565E8@mail.nih.gov
Whole thread Raw
Responses Re: using a correlated subquery in update
List pgsql-novice
I have a table that has a column that has values like XM_29832.11 and I
want to do an update to take off the .11 part.  I can do this for a
single value using:

select substring('XM_29832.11' from '^([A-Z]*_[0-9*])');

However, how can I write an update to use the above as a subquery to
update the whole column at once?

Thanks,
Sean


pgsql-novice by date:

Previous
From: Kjetil Haaland
Date:
Subject: order by for user defined types
Next
From: Tom Lane
Date:
Subject: Re: order by for user defined types