I've got MSSQL 2012 database with some data issues in the certain column A which contains text.
There are many occurences of aditional unnecesarry character after the </B>
tag, for instance:
'<B>Something</B>g' where should stand '<B>Something</B>'
'<B>SomethingElse</B>e' where should stand '<B>SomethingElse</B>'
Previous values are part of a greater text, for instance and can occur more than once -> Column example:
'Some text is here <B>Something</B>g and also here <B>SomethingElse</B>e more text'
Those 'extra' characters are always the same as the last character between the <B></B>
tags.
I would like to create SQL scripts which will:
Remove extra character after
</B>
tagOnly if extra character is the same as the last character between the
<B></B>
tags (as a aditional check). EDIT: This is not absolutely necessary
I assuming there is a way of calling replace function, like in this pseudo in which X represents any character.
replace(X</B>X, X</B>);
But I am not very good in SQL and also I don't know how to implement 2. check.
Thank you for your help.