sql - REPLACE OR DROP PART OF A STRING -


i looking drop or replace word(s) in string.

example:string = pink lenovo laptop

desired output = lenovo

and so, tried, replace(pink lenovo laptop', 'lenovo'). of course out put be: pink laptop

any idea how can drop pink , laptop or replace whole string lenovo. appreciated. thank you!

edit1:

just clarify, trying replace string of words sentence 1 or 2 words.

so, example i'd replace "pink lenovo laptop - i7 16gb ram" "lenovo - i7 16gb ram"

according how understand requirements, one:

regexp_replace(regexp_replace('pink lenovo laptop', 'pink '), ' laptop') 

Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -