Re: using replace function

2019-12-02 Thread Antonio Silva
Hi Osvaldo, Rod, David and Tom Thanks for your attention. Lastly it is not that difficult. For me the more natural way is Rod's suggestion, to use replace with where. I don't know why I didn't think of this solution. The usage of regexp_replace is very nice too and I will take a time to learn i

Re: using replace function

2019-11-28 Thread Tom Lane
"David G. Johnston" writes: > On Thursday, November 28, 2019, Rob Sargent wrote: >> I want to replace a string (not a substring) in a field but making sure >> that the string in the full field. > I’d probably do something like: > Select case when a.col = ‘value’ then ‘new value’ else a.col end f

Re: using replace function

2019-11-28 Thread David G. Johnston
On Thursday, November 28, 2019, Rob Sargent wrote: > > > > On Nov 28, 2019, at 1:09 PM, Antonio Silva > wrote: > > > > Hello list > > > > I want to replace a string (not a substring) in a field but making sure > that the string in the full field. > > > > In the example below since 'blue' is not

Re: using replace function

2019-11-28 Thread Rob Sargent
> On Nov 28, 2019, at 1:09 PM, Antonio Silva wrote: > > Hello list > > I want to replace a string (not a substring) in a field but making sure that > the string in the full field. > > In the example below since 'blue' is not the full text in 'blue shark' there > should not have a replaceme