Generates the Unicode index value for the first character of the input string.

Column reference example:

unicode(MyChar)

Output: Returns Unicode index value for the first character in the MyChar column. 

String literal example:

unicode('A')

Output: Returns the integer 65.

unicode(column_string)


ArgumentRequired?Data TypeDescription
column_stringYstringName of the column or string literal the Unicode value of which is generated

column_string

Name of the column or string literal, the first character of which is converted to its corresponding Unicode value.

NOTE: If the input string contains multiple characters, the first character is mapped to its Unicode value, and the rest are ignored.

Required?Data TypeExample Value
YesString literal or column referencemyColumn

Example - char and unicode functions