获取Redshift中字符的ASCII值 [英] Get the ASCII value of a character in Redshift
本文介绍了获取Redshift中字符的ASCII值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图找到一个字符的ASCII值是一个字符串.我本质上是在寻找CHR的对立面,CHR(65)=A.类似地,fn(A)应该返回65.我在redshift SQL手册中找不到任何函数.
I am trying to find the ASCII value of a character is a string. I am essentially looking for the opposit of CHR, CHR(65)= A. Similarly fn(A) should return 65. I could not find any function in redshift SQL manual.
推荐答案
我能找到的最近的是:
ASCII是仅弃用的领导者节点功能.
ASCII is a deprecated leader node–only function.
您可以编写 Python用户定义函数,该函数返回给定ASCII值的字符.
You could write a Python User-Defined Function that returns a character given the ASCII value.
这篇关于获取Redshift中字符的ASCII值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文