Result Value - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-01-12
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
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.