Result Value - Advanced SQL Engine - Teradata Database

SQL Functions, Expressions, and Predicates

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-30
dita:mapPath
tpt1555966086716.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1145
lifecycle
previous
Product Category
Teradata Vantage™

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.