Replacing a string in MS SQL.
REPLACE(OriginalField, "OldString", "NewString")
SELECT REPLACE(LastName, "Smith", "OriginalSmith")
This would change all occurrences of Smith in the LastName field to OriginalSmith. Smith becomes OriginalSmith, O'Smith becomes O'OriginalSmith, smithey becomes OriginalSmithey, and so forth. Microsoft has this on their site, but sometimes their terminology is too technical when looking for a quick answer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment