I have a column of type nvarchar(max) in a table that contains the substring '><'.
I need to replace the '><' and make it '> <', but I only want to do it when it is not '><\' or '><!'.
Is there a way to make the replace function conditional?
There will be several occurrences of '><' in the column.
Thanks for your help.
You can do this by first replacing the sequences you want to keep with sequences that won’t naturally appear in the column, then replace the ones you want to replace, then switch the others back.