Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Caculate how many bytes of string - response (8) by ricky_ru

$
0
0
Dears,   I think i am clear with this problem. Because the collation is ASCII. So, characters out of ascii scope will be considered as '?' in ascii.  And 63(HEX 3F) is the ascii code for '?'. The following test results is from java code. Test ASCII encoding.... : Decimal: 63, Hex: 3F ¥: Decimal: 63, Hex: 3F £: Decimal: 63, Hex: 3F ?: Decimal: 63, Hex: 3F A: Decimal: 65, Hex: 41 So, for the three charaters, the ascii of them are all less than 'A'(I had a typo in the last thread for the result of the second sql. The result should be 1). But what I did not understand is that why ''<='¥' returns false in the first sql?(they have the same ascii code, 1 should be returned if my explaination for the encoding/decoding is right) Also, I want to change the session collation to UTF8 with SET SESSION COLLATION UTF8/UTF-8 but failed because of Error: [Teradata Database] [TeraJDBC 14.00.00.14] [Error 3706] [SQLState 42000] Syntax error: Expected a collation value. thoughts?   Thanks, RR  

Viewing all articles
Browse latest Browse all 27759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>