Replace a character at N position in a string
问题 I want to replace a character at N position in a string. This my query: SELECT code FROM tablecodes The result is 3 rows: AXGETYTRTFYZUFYZFFFDIZEG GFYZUFYZFAXFCDIZAX ZUFYZGEFYFAXFFIXZRA I can't figure out how to replace the last 'Z' character on each row with 'A'. I want the result to look like this: AXGETYTRTFYZUFYZFFFDIAEG GFYZUFYZFAXFCDIAAX ZUFYZGEFYFAXFFIXARA The 'Z' character is always in the same position (length of the string - 3) Any suggestions? Thanks. 回答1: Use Stuff Function