I'm writing a SQL Update statement to replace parts of a string. The one scenario I can't get is to only replace the first part of the string before the colon. I want to make the simple change from the value S to S2.
Current String: S:S:S;S:S:S
Wanted String: S2:S:S;S:S:S
SQL that I currently have:
UPDATE [table]
SET [column] = REPLACE([cell], 'S:', 'S2:')
WHERE [cell] LIKE 'S:%'
This produces the value S2:S2:S;S2:S2:S
Fields in [] are programmatically handled variables. I'm just struggling with the SQL part.