• Here's an option on how to do it.
    You might want to check the following articles to understand what's happening in the code and to get the function used.
    http://www.sqlservercentral.com/articles/String+Manipulation/94365/
    http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    SELECT k.ID,
      k.Keys,
      ( SELECT CASE WHEN s.Matched = 1 THEN CHAR( s.Item + 64) ELSE s.Item END
        FROM @Keys i
        CROSS APPLY dbo.PatternSplitCM(i.Keys, '%[0-9]%') s
        WHERE k.ID = i.ID
        ORDER BY s.ItemNumber
        FOR XML PATH(''), TYPE).value('./text()[1]', 'varchar(max)') AS NewKeys
    FROM @Keys k
    GROUP BY k.ID,
      k.Keys;

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2