Sample Header Ad - 728x90

Replacing a specific string in oracle

2 votes
1 answer
2268 views
I've a database value 'INS. Company Cancelled' where multiple values are separated by '.' I'm trying to replace 'INS' with 'INSEXP' my expected result is 'INSEXP. Company Cancelled' I've tried below two queries to update the field my output is like 'INSEXP. Company Cancelled. Company Cancelled' update my_table SET column_name = (select replace(column_name, 'INS', 'INSEXP') from my_table WHERE seq_num = 123) WHERE seq_num = 123; update my_table set column_name = replace(column_name, 'INS', 'INSEXP') WHERE seq_num = 123; Could someone please tell me what I'm doing wrong here?
Asked by Aravind (193 rep)
Jan 31, 2021, 08:42 AM
Last activity: Jan 31, 2021, 06:34 PM