Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

convert hexadecimal string to bigint

avatar
Explorer

Hello

I have a table with a field of type string that is a hexadecimal number, like 

04191D0A035580

04421352E14B80

040F644A385780

 

is there a way to convert this string values to bigint values like:

04191D0A035580 --> 1153512419579264

04421352E14B80 --> 1198550669151104

040F644A385780 --> 1142823323195264

 

thanks in advance for your help

best regards

dcon

 

1 ACCEPTED SOLUTION

avatar
Explorer

Hello

Looking for hive i find the funcion

conv('04191D0A035580', 16,10) that convert the string to string that can be casted to bigint,  this function also work in impala, i will use it.

thanks 

regards

dcon.

View solution in original post

1 REPLY 1

avatar
Explorer

Hello

Looking for hive i find the funcion

conv('04191D0A035580', 16,10) that convert the string to string that can be casted to bigint,  this function also work in impala, i will use it.

thanks 

regards

dcon.