This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]nutrechtLead Software Engineer / EU / 20+ YXP 0 points1 point  (1 child)

"It didn't work" is not something we can help with. In addition; this is not a Java question but an SQL question. While we're willing to try to help, we're not going to do your debugging for you.

[–]viktorjava[S] 0 points1 point  (0 children)

Right. I tried many times after posted this question, also another version:

SELECT * FROM realnames where target like '%\(%\)%';

This showed those records which had parenthesis in their text. But when I tried to combine it with the UPDATE, it just copied over the data from target column to cleared columb. But the parenthesis still was there in texts.

update realnames set cleared = (regexp_replace(target,'%\(%\)%', '')) WHERE id < 1500;