TheIntrepidSpiff
TheIntrepidSpiff

Reputation: 189

How to convert HEX value to Decimal in HIVE HQL

I've got Hive 1.1, and I'm having trouble converting a HEX value into a Decimal or BIGINT.

Using UNHEX('2BD1BCAE0501250E') should return= 3157512269357720846

But instead, I'm getting something like WingDings= +Ѽ�%

I've tried DECODE, ENCODE, BASE64...but nothing seems to be working. Has anyone else tried doing this? Thanks

Upvotes: 0

Views: 14802

Answers (1)

sandeep rawat
sandeep rawat

Reputation: 4957

Conv(STRING num, int from_base, int to_base) Converts a number from a given base to another

   conv('2BD1BCAE0501250E', 16, 10)

Upvotes: 10

Related Questions