I have a list of ProductName key/value pairs, like so:
CREATE TABLE [dbo].[ProductNames]
(
[Key] [nvarchar](100) NULL,
[Value] [nvarchar](100) NULL
)
Containing values like this:
'Pepsi', 'Pepsi®'
'Coke', 'Coke®'
I need to find and replace values in a text field that DO NOT ALREADY contain the registered trademark for a product...and replace it with the full trademark string.
FOR EXAMPLE:
1. if 'Pepsi' is alone....it becomes 'Pepsi®'
2. if 'Pepsi®' already exists...do nothing
UPDATE: The registered trademark is only one example of something to be replaced. There could be other multi-character replacements as well. As such, something more complex is probably needed. For example, I would probably detect 'Pepsi', then truncate 'Pepsi' from the VALUE portion of the key/value row...AND THEN...try to detect if that truncated value already exists in the string. If not, then go ahead and replace the value (something like that).