天天看点

SAP HANA里的中文排序问题

SAP HANA里的中文排序问题

end PreparedStatement_execute (thread 29569, con-id 300136) at 2017-09-11 15:54:31.140143

ResultSet.columnLabel = [SID:INTEGER, CNAME:NVARCHAR, ENAME:NVARCHAR] (thread 29569, con-id 300136) at 2017-09-11 15:54:31.140189

ResultSet.row[1] = [3, u’’’\xE7\x88\xB1\xE6\xB4\xBB\xE5\x8A\x9B’’’, u’’‘Aihuoli’’’] (thread 29569, con-id 300136) at 2017-09-11 15:54:31.140204

ResultSet.row[2] = [1, u’’’\xE5\xB1\xB1\xE4\xB8\x9C’’’, u’’‘ShanDong’’’] (thread 29569, con-id 300136) at 2017-09-11 15:54:31.140210

ResultSet.row[3] = [2, u’’’\xE5\x8D\x8E\xE4\xB8\xBA’’’, u’’‘Huawei’’’] (thread 29569, con-id 300136) at 2017-09-11 15:54:31.140216

Therefore, 爱活力 will be bigger than 山东 and 华为.

If you want to sort the Chinese character as you expected, I think the most convenient way is to add a column that display the Chinese name in pinyin and sort in that column.

继续阅读