Hi!
Is there any way to get the Replace() function in MSSQL to replace only the first occurence of a substring? For example, my Name column has the following data:
Bob
BobBob
And I want to replace "Bob" with "Robert," but *only* the first occurence:
Robert
RobertBob
Unfortunately, the length of the original string, the searchFor substring, and the replaceWith substring all vary. Any idea what the most efficient way to do this might be?
Is there any way to get the Replace() function in MSSQL to replace only the first occurence of a substring? For example, my Name column has the following data:
Bob
BobBob
And I want to replace "Bob" with "Robert," but *only* the first occurence:
Robert
RobertBob
Unfortunately, the length of the original string, the searchFor substring, and the replaceWith substring all vary. Any idea what the most efficient way to do this might be?
Comment