Archives of the TeradataForum
Message Posted: Thu, 23 Oct 2008 @ 14:53:20 GMT
<-- Anonymously Posted: Thu, 23 Oct 2008 09:39 -->
I need to replace all characters in a string where the character value is between '1A'XC and '1F'XC, with a different value, say '#'. In other words, find all characters in this string 'ABCD|~ JKL', where the character value is between '1A'XC and '1F'XC and replace it with a '#'.
Normally, I'd use a UDF TRANSLATE or REPLACE function for this, but the value range of '1A'XC to '1F'XC does not translate into chracters, which makes this difficult to do (for me!). I've considered using the CHAR2HEXINT function, combined with an INDEX function, but that only allows the detection of the first instance of an unprintable character, and only for one of these unpritable values, not the full range.
Any advice much appreciated - thanks!
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|