On 17:09 Tue 17 Jan , Lynna Landstreet wrote:
> I'm wondering if there is a way in SQL to find and replace a specific string
> within various database records, the way you might across a text document.
> Not to replace the entire value of the fields in which the string is found,
> but just that specific string.
> So is there a way to search out all occurrences of, say,
> the string "testsite.mydomain.com" within a specific column and change
> it to "www.theirdomain.com" wherever it's found?
regexp_replace(field, 'testsite\.mydomain\.com', 'www\.theirdomain\.com' [,flags])
In response to
pgsql-novice by date
|Next:||From: s anwar||Date: 2006-01-18 01:23:56|
|Subject: Re: alter table set tablespace over nfs getting stuck|
|Previous:||From: Tom Lane||Date: 2006-01-17 22:53:52|
|Subject: Re: alter table set tablespace over nfs getting stuck |