16.20 - Result Value - Teradata Vantage NewSQL Engine

Teradata Vantage™ SQL Functions, Expressions, and Predicates

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

STRING_CS returns a heuristically derived INTEGER value that you can use to help determine the client character set that was used to encode the KANJI1 character string or expression. The result value can also help determine which client character set to use to interpret the character data.

IF the result value is … THEN the heuristic found that string_expression  …
-1 most likely uses a single-byte client character set encoding, but it may also contain a mix of encodings.
0 does not contain anything distinguishable from any particular character set, so any character set that you use to interpret string_expression provides the same result.

Not all translations use the same interpretation for the characters represented by 0x5C and 0x7E, however.

If string_expression contains:

0x5C and you want it to be interpreted as REVERSE SOLIDUS, use a single-byte character set.

0x7E and you want it to be interpreted as TILDE, use a single-byte character set.

0x5C and you want it to be interpreted as YEN SIGN, or

0x7E and you want it to be interpreted as OVERLINE, use any of the following:
  • KANJISJIS_0S
  • KANJIEBCDIC5026_0I
  • KANJIEBCDIC5035_0I
  • KATAKANAEBCDIC
  • KANJIEUC_0U
1 uses the encoding of one of the following:
  • KANJIEBCDIC5026_0I
  • KANJIEBCDIC5035_0I
  • KATAKANAEBCDIC
2 uses the encoding of KANJIEUC_0U.
3 uses the encoding of KANJISJIS_0S.