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.
Showing posts with label MS SQL. Show all posts
Showing posts with label MS SQL. Show all posts
Monday, August 19, 2013
Subscribe to:
Posts (Atom)